3v4l.org

run code in 300+ PHP versions simultaneously
<?php $image = array( 'first', 'second', 'third' ); $str_start = microtime( true ); echo $image['0'] . "\n"; $str_end = ( microtime( true ) - $str_start ) * 1000; $int_start = microtime( true ); echo $image[0]; $int_end = ( microtime( true ) - $int_start ) * 1000; echo "\n"; echo 'Time with string: ' . $str_end . "\n"; echo 'Time with int: ' . $int_end;

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.1.30.0120.01217.61
8.1.20.0160.00817.69
8.1.10.0210.00317.46
8.1.00.0190.00417.52
8.0.160.0140.00516.84
8.0.150.0160.00316.84
8.0.140.0180.00016.84
8.0.130.0130.00616.74
8.0.120.0060.00314.04
8.0.110.0120.00413.97
8.0.100.0100.00614.00
8.0.90.0140.00313.99
8.0.80.0110.00513.99
8.0.70.0100.00513.98
8.0.60.0110.00613.95
8.0.50.0110.00613.92
8.0.30.0110.00413.94
8.0.20.0120.00414.02
8.0.10.0130.00314.08
8.0.00.0020.00514.09
7.4.280.0050.00416.44
7.4.270.0100.00516.32
7.4.260.0180.00316.42
7.4.250.0050.00213.82
7.4.240.0080.00213.89
7.4.230.0050.00413.74
7.4.220.0060.00313.81
7.4.210.0100.00313.84
7.4.200.0140.00113.84
7.4.190.0120.00413.90
7.4.180.0120.00413.90
7.4.160.0080.00813.94
7.4.150.0110.00413.88
7.4.140.0110.00313.76
7.4.130.0080.00413.79
7.4.120.0100.00513.79
7.4.110.0110.00413.80
7.4.100.0130.00213.84
7.4.90.0100.00413.83
7.4.80.0130.00413.81
7.4.70.0130.00313.81
7.4.60.0110.00413.74
7.4.50.0110.00313.72
7.4.40.0100.00613.72
7.4.30.0090.00613.72
7.4.20.0090.00513.80
7.4.10.0090.00613.78
7.4.00.0110.00413.72
7.3.330.0050.00413.72
7.3.320.0140.00413.79
7.3.310.0140.00413.83
7.3.300.0140.00413.76
7.3.290.0100.00413.74
7.3.280.0100.00313.77
7.3.270.0110.00313.72
7.3.260.0070.00513.59
7.3.250.0110.00313.71
7.3.240.0060.00613.68
7.3.230.0100.00413.67
7.3.220.0100.00313.70
7.3.210.0100.00413.66
7.3.200.0100.00313.66
7.3.190.0070.00413.46
7.3.180.0100.00213.68
7.3.170.0100.00313.73
7.3.160.0080.00513.52
7.3.150.0140.00213.67
7.3.140.0110.00513.76
7.3.130.0140.00313.70
7.3.120.0110.00413.67
7.3.110.0130.00313.64
7.3.100.0120.00513.63
7.3.90.0150.00213.99
7.3.80.0120.00313.64
7.3.70.0120.00413.87
7.3.60.0130.00213.96
7.3.50.0120.00413.94
7.3.40.0120.00313.85
7.3.30.0130.00413.93
7.3.20.0140.00415.34
7.3.10.0130.00415.31
7.3.00.0160.00415.34

preferences:
27.12 ms | 401 KiB | 5 Q