Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

PHP

hello world

1
2
3
<?php
print("hello world");
?>
https://snipt.net/embed/756c76843622d4e068e5e083ea5e2c30/
https://snipt.net/raw/756c76843622d4e068e5e083ea5e2c30/
756c76843622d4e068e5e083ea5e2c30
php
PHP
3
2016-12-02T18:25:05
True
False
False
Mar 19, 2013 at 09:28 AM
/api/public/snipt/57926/
hello-world-44
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="k">print</span><span class="p">(</span><span class="s2">&quot;hello world&quot;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
hello

PHP

PHP Hello World

<?php
    echo "Hello World";
https://snipt.net/embed/cdb2796984bcc8cb34b7f37f0a8b2d95/
https://snipt.net/raw/cdb2796984bcc8cb34b7f37f0a8b2d95/
cdb2796984bcc8cb34b7f37f0a8b2d95
php
PHP
3
2016-12-03T06:00:53
True
False
False
/api/public/snipt/33771/
php-hello-world
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">echo</span> <span class="s2">&quot;Hello World&quot;</span><span class="p">;</span> </span></pre></div> </td></tr></table>
hello, php, world

C

Hello World

1
2
3
4
void HelloWorld()
{
   printf("Hello World!\n");
}
https://snipt.net/embed/08a76044bddc7f59bc95ebb49a522aff/
https://snipt.net/raw/08a76044bddc7f59bc95ebb49a522aff/
08a76044bddc7f59bc95ebb49a522aff
c
C
4
2016-12-02T18:25:10
True
False
False
/api/public/snipt/29846/
hello-world-26
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kt">void</span> <span class="nf">HelloWorld</span><span class="p">()</span> </span><span id="L-2"><a name="L-2"></a><span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Hello World!</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
c, hello, world

PHP

Hello World Php

<?php
echo "Hello, World"; ?>
https://snipt.net/embed/29b3b027ff633e9b5768cbefb3bb10ac/
https://snipt.net/raw/29b3b027ff633e9b5768cbefb3bb10ac/
29b3b027ff633e9b5768cbefb3bb10ac
php
PHP
2
2016-12-05T05:25:09
True
False
False
/api/public/snipt/27001/
hello-world-php
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="k">echo</span> <span class="s2">&quot;Hello, World&quot;</span><span class="p">;</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
hello, php, world

Text only

Hello World

Hello World!
https://snipt.net/embed/2d195b6f6cc01030ad50b1ce87121648/
https://snipt.net/raw/2d195b6f6cc01030ad50b1ce87121648/
2d195b6f6cc01030ad50b1ce87121648
text
Text only
1
2016-12-05T06:36:52
True
False
False
/api/public/snipt/22056/
hello-world-20
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Hello World! </span></pre></div> </td></tr></table>
hello, world

C

hello world to snipt

1
2
3
4
5
6
char * helloSnipt()
{
 char * output = calloc(11,sizeof(char));
 *output = "hello snipt";
 return output;
}
https://snipt.net/embed/2d8bf819ce7f138c41221997e6f2cc19/
https://snipt.net/raw/2d8bf819ce7f138c41221997e6f2cc19/
2d8bf819ce7f138c41221997e6f2cc19
c
C
6
2016-12-02T18:25:16
True
False
False
/api/public/snipt/20267/
hello-world-to-snipt
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kt">char</span> <span class="o">*</span> <span class="nf">helloSnipt</span><span class="p">()</span> </span><span id="L-2"><a name="L-2"></a><span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="kt">char</span> <span class="o">*</span> <span class="n">output</span> <span class="o">=</span> <span class="n">calloc</span><span class="p">(</span><span class="mi">11</span><span class="p">,</span><span class="k">sizeof</span><span class="p">(</span><span class="kt">char</span><span class="p">));</span> </span><span id="L-4"><a name="L-4"></a> <span class="o">*</span><span class="n">output</span> <span class="o">=</span> <span class="s">&quot;hello snipt&quot;</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">return</span> <span class="n">output</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
hello, snipt, world

Text only

LOLCODE HAI WORLD

1
2
3
4
5
6
BTW HAI WORLD in LOLCODE ("BTW" means comment)

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
https://snipt.net/embed/1e9aee3dae59d41e236a893ba683f9a7/
https://snipt.net/raw/1e9aee3dae59d41e236a893ba683f9a7/
1e9aee3dae59d41e236a893ba683f9a7
text
Text only
6
2016-12-03T14:05:39
True
False
False
/api/public/snipt/11038/
lolcode-hai-world
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>BTW HAI WORLD in LOLCODE (&quot;BTW&quot; means comment) </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>HAI </span><span id="L-4"><a name="L-4"></a>CAN HAS STDIO? </span><span id="L-5"><a name="L-5"></a>VISIBLE &quot;HAI WORLD!&quot; </span><span id="L-6"><a name="L-6"></a>KTHXBYE </span></pre></div> </td></tr></table>
"hai world", "hello world", hello, lolcode

d-objdump

First Google Go snipt: Hello World

1
2
3
4
5
6
7
package main

import "fmt"

func main() {
  fmt.Printf("Hello, World!")
}
https://snipt.net/embed/0fcbe8cf3dfd64b9622b68290f0bed9b/
https://snipt.net/raw/0fcbe8cf3dfd64b9622b68290f0bed9b/
0fcbe8cf3dfd64b9622b68290f0bed9b
d-objdump
d-objdump
7
2016-12-04T04:40:07
True
False
False
/api/public/snipt/10010/
first-google-go-snipt-hello-world
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">package</span> <span class="n">main</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">import</span> <span class="s">&quot;fmt&quot;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="n">func</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span> </span><span id="L-6"><a name="L-6"></a> <span class="n">fmt</span><span class="p">.</span><span class="n">Printf</span><span class="p">(</span><span class="s">&quot;Hello, World!&quot;</span><span class="p">)</span> </span><span id="L-7"><a name="L-7"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
go, hello, world

PHP

hello snipt

1
2
3
<?
echo "Hello Snipt ;)";
?>
https://snipt.net/embed/ff280bb743d9ce70261e1e34052d34b0/
https://snipt.net/raw/ff280bb743d9ce70261e1e34052d34b0/
ff280bb743d9ce70261e1e34052d34b0
php
PHP
3
2016-12-02T18:25:23
True
False
False
/api/public/snipt/9994/
hello-snipt-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?</span> </span><span id="L-2"><a name="L-2"></a><span class="k">echo</span> <span class="s2">&quot;Hello Snipt ;)&quot;</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
echo, hello, php, snipt

C++

hello~

cout<<"hello world"<<endl;
https://snipt.net/embed/42918a5f31a67b9814e60e101451d2e5/
https://snipt.net/raw/42918a5f31a67b9814e60e101451d2e5/
42918a5f31a67b9814e60e101451d2e5
cpp
C++
1
2016-12-02T18:25:25
True
False
False
/api/public/snipt/9227/
hello-3
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="n">cout</span><span class="o">&lt;&lt;</span><span class="s">&quot;hello world&quot;</span><span class="o">&lt;&lt;</span><span class="n">endl</span><span class="p">;</span> </span></pre></div> </td></tr></table>
hello, world
Copyrighted, illegal, or inappropriate content? Email [email protected].