Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
Sort
Popular
Most liked
Most recent
Time
Today
Last week
Last month
Last year
All time
Select Languages
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
ColdFusion
Command
CSS
Delphi
Django
Grunt
Gulp
HAML
HTML
iOS
Jade
Java
JavaScript
jQuery
Less
MySQL
Objective
Other
Pascal
Perl
PHP
PowerShell
Processing
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
Smarty
SQL
Swift
VHDL
XHTML
XML
Xojo
XSLT
SCSS
CoffeeScript
GLSL
Progress
Stylus
ES6
Coffee
TypeScript
X++
Haskell
SmallBASIC
JSX
SVG
Plain text
LUA
MDX
Apply
Reset
popular • PHP
PHP - Current Year
PHP
1
0
3774
Add a Custom Sidebar in Wordpress
PHP
0
1
3106
get the post in wordpress
PHP
0
1
3147
Compaire an Array in php
PHP
2
1
3218
get the ip address and print in php
PHP
0
1
3216
get the current page url in php
PHP
0
2
3033
Display path to current directory
PHP
2
1
2915
Get the size of a file
PHP
0
0
2979
create any extension type file(html, php, xml, etc...)
PHP
0
2
2958
Delete any extension type file(html, php, jpg, gif, flv, swf, etc...)
PHP
0
1
2935
Run code on the specified day/time
PHP
0
3
3046
Last modified date of the page
PHP
0
2
3444
Page Redirect
PHP
0
0
3113
Next and Previous functionality with thumbnail image in single post wordpress
PHP
0
3
5296
Leading zero
PHP
0
1
2723
Current age in years and months from given birthdate
PHP
0
5
2661
Encrypt / Decrypt a string with own encryption key
PHP
0
3
3026
Generate an random ID number (ID length is optional)
PHP
0
3
2962
Generate a nice random serialnumber
PHP
0
8
2814
Hello world with PHP
PHP
1
0
2744