3v4l.org

run code in 500+ 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 ) );

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.2.70.0180.00617.38
8.2.60.0170.00519.14
8.2.50.0130.00817.25
8.2.40.0130.00417.99
8.2.30.0070.01017.43
8.2.20.0160.00117.43
8.2.10.0130.00517.43
8.2.00.0100.00717.31
8.1.200.0150.00316.75
8.1.190.0150.00516.88
8.1.180.0190.00018.64
8.1.170.0180.00017.31
8.1.160.0130.00517.37
8.1.150.0160.00217.18
8.1.140.0100.00717.31
8.1.130.0140.00417.43
8.1.120.0160.00217.25
8.1.110.0100.00717.31
8.1.100.0080.01018.25
8.1.90.0120.00817.31
8.1.80.0150.00417.43
8.1.70.0110.00717.37
8.1.60.0130.00617.56
8.1.50.0130.00717.37
8.1.40.0150.00417.37
8.1.30.0130.00717.37
8.1.20.0140.00517.31
8.1.10.0150.00417.31
8.1.00.0150.00417.35
8.0.290.0180.00316.58
8.0.280.0130.00417.10
8.0.270.0120.00517.10
8.0.260.0130.00517.10
8.0.250.0110.00617.10
8.0.240.0110.00717.95
8.0.230.0130.00417.10
8.0.220.0110.00617.10
8.0.210.0080.01017.10
8.0.200.0140.00417.10
8.0.190.0140.00417.10
8.0.180.0150.00317.88
8.0.170.0120.00517.10
8.0.160.0160.00217.11
8.0.150.0140.00417.10
8.0.140.0120.00517.10
8.0.130.0160.00217.10
8.0.120.0160.00217.80
8.0.110.0130.00317.10
8.0.100.0130.00517.10
8.0.90.0160.00117.10
8.0.80.0130.00617.10
8.0.70.0150.00317.83
8.0.60.0160.00217.10
8.0.50.0120.00517.10
8.0.30.0080.00817.10
8.0.20.0160.00217.10
8.0.10.0140.00218.01

preferences:
44.31 ms | 717 KiB | 5 Q