3v4l.org

run code in 300+ PHP versions simultaneously
<?php define( 'MINUTE_IN_SECONDS', 60 ); define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS ); function current_time_61( $gmt_offset ) { return time() + (int) ( $gmt_offset * HOUR_IN_SECONDS ); } function current_time_62( $gmt_offset ) { return time() + ( (int) $gmt_offset * HOUR_IN_SECONDS ); } function current_time_621( $gmt_offset ) { return time() + (int) ( (float) $gmt_offset * HOUR_IN_SECONDS ); } var_dump( current_time_61( 5.5 ) ); var_dump( current_time_62( 5.5 ) ); var_dump( current_time_621( 5.5 ) );
Output for git.master, git.master_jit
int(1687445730) int(1687443930) int(1687445730)

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:
25.2 ms | 405 KiB | 5 Q