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
3717
Add a Custom Sidebar in Wordpress
PHP
0
1
3057
get the post in wordpress
PHP
0
1
3095
Compaire an Array in php
PHP
2
1
3164
get the ip address and print in php
PHP
0
1
3168
get the current page url in php
PHP
0
2
2987
Display path to current directory
PHP
2
1
2868
Get the size of a file
PHP
0
0
2911
create any extension type file(html, php, xml, etc...)
PHP
0
2
2911
Delete any extension type file(html, php, jpg, gif, flv, swf, etc...)
PHP
0
1
2892
Run code on the specified day/time
PHP
0
3
2997
Last modified date of the page
PHP
0
2
3393
Page Redirect
PHP
0
0
3066
Next and Previous functionality with thumbnail image in single post wordpress
PHP
0
3
5249
Leading zero
PHP
0
1
2678
Current age in years and months from given birthdate
PHP
0
5
2622
Encrypt / Decrypt a string with own encryption key
PHP
0
3
2947
Generate an random ID number (ID length is optional)
PHP
0
3
2916
Generate a nice random serialnumber
PHP
0
8
2767
Hello world with PHP
PHP
1
0
2699