3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*$original = date_default_timezone_set( 'Europe/Berlin'); $WordPress = date_default_timezone_set('UTC'); $tz = timezone_open( 'Asia/Tokyo' ); $date = date_create( '2025-07-30 22:30:00', $tz ); $thisyear = (int) date_format( $date, 'Y' ); $thismonth = (int) date_format( $date, 'm' ); $unixmonth = mktime( 0, 0, 0, $thismonth, 1, $thisyear ); // if set Europe/Berlin 1751320800 (+02:00) $last_day = gmdate( 't', $unixmonth ); var_dump($unixmonth, $thismonth, $last_day, $WordPress);*/ $date = strtotime( '2025-07-31 23:59:59' ); $year = date( 'Y', $date ); $month = date( 'm', $date ); $string = $year . '-' . $month . '-' . '01 00:00:00UTC'; $unixmonth = strtotime( $string ); $last_day = date( 't', $date ); var_dump( $unixmonth, $last_day ); ?>
Output for git.master_jit, git.master
Warning: Module "Zend OPcache" is already loaded in Unknown on line 0 Warning: Zend OPcache: module registration failed! in Unknown on line 0 int(1751328000) string(2) "31"
Output for rfc.property-hooks
int(1751328000) string(2) "31"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
75.73 ms | 406 KiB | 5 Q