3v4l.org

run code in 300+ PHP versions simultaneously
<?php // start engines; for($i=0;$i++<2;)number_format(hrtime(true),5);test_1('hi');test_2('hi'); function test_1( $string ) {} function test_2( string $string ) {} $t = hrtime(true); for ( $i = 0; ++$i < 1e6; ) test_1( 'hi' ); echo 'untyped: ', $a=number_format( (hrtime(true)-$t)/1e9,5),"s\n"; $t = hrtime(true); for ( $i = 0; ++$i < 1e6; ) test_2( 'hi' ); echo 'typed: ', $b=number_format( (hrtime(true)-$t)/1e9,5),"s\n"; printf( 'Typed is %d%% slower.', (1-($a/$b))*100 );

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.4.20.0100.03317.78
8.4.10.0100.03421.81
8.3.160.0100.03718.53
8.3.150.0130.04417.28
8.3.140.0130.05016.63
8.3.130.0090.01816.67
8.3.120.0030.02418.86
8.3.110.0060.02216.54
8.3.100.0030.02416.53
8.3.90.0160.02926.77
8.3.80.0060.02616.75
8.3.70.0130.05716.58
8.3.60.0130.05716.75
8.3.50.0100.05818.38
8.3.40.0070.04120.50
8.3.30.0060.04218.64
8.3.20.0070.02124.18
8.3.10.0030.02624.66
8.3.00.0030.02226.16
8.2.270.0060.01916.76
8.2.260.0130.04518.80
8.2.250.0090.01818.41
8.2.240.0070.02319.09
8.2.230.0100.04420.94
8.2.220.0030.02724.06
8.2.210.0070.04126.77
8.2.200.0100.02416.38
8.2.190.0100.04016.58
8.2.180.0030.04725.92
8.2.170.0200.05122.96
8.2.160.0100.04022.96
8.2.150.0000.02625.66
8.2.140.0060.01924.66
8.2.130.0030.02326.16
8.2.120.0000.02526.16
8.2.110.0030.04922.08
8.2.100.0130.03417.71
8.2.90.0060.02817.78
8.2.80.0030.03219.25
8.2.70.0060.03218.04
8.2.60.0130.03117.99
8.2.50.0060.02918.10
8.2.40.0000.03518.24
8.2.30.0030.03218.06
8.2.20.0000.03419.30
8.2.10.0030.03118.25
8.2.00.0070.02719.34
8.1.310.0070.02016.80
8.1.300.0030.02418.55
8.1.290.0070.02530.84
8.1.280.0030.06225.92
8.1.270.0060.01924.66
8.1.260.0070.02026.35
8.1.250.0060.01928.09
8.1.240.0070.04324.05
8.1.230.0100.02922.75
8.1.220.0030.03117.91
8.1.210.0060.02918.77
8.1.200.0000.05217.35
8.1.190.0070.02917.10
8.1.180.0040.03618.10
8.1.170.0100.02618.65
8.1.160.0030.03018.95
8.1.150.0030.03018.57
8.1.140.0000.03417.40
8.1.130.0030.02918.96
8.1.120.0000.03417.49
8.1.110.0030.03017.42
8.1.100.0060.03317.35
8.1.90.0060.03717.37
8.1.80.0170.02917.43
8.1.70.0110.03417.41
8.1.60.0080.03617.62
8.1.50.0150.03117.50
8.1.40.0120.03517.50
8.1.30.0150.03117.61
8.1.20.0150.03017.61
8.1.10.0060.03517.47
8.1.00.0120.03117.33
8.0.300.0030.03120.03
8.0.290.0030.03116.75
8.0.280.0060.02918.52
8.0.270.0000.03418.00
8.0.260.0040.03118.52
8.0.250.0040.03217.04
8.0.240.0030.03117.03
8.0.230.0140.02916.89
8.0.220.0060.03316.86
8.0.210.0140.03116.92
8.0.200.0040.03616.88
8.0.190.0110.03016.97
8.0.180.0120.03016.74
8.0.170.0140.03016.85
8.0.160.0070.03316.80
8.0.150.0060.03316.79
8.0.140.0100.03116.71
8.0.130.0100.03116.72
8.0.120.0050.03616.83
8.0.110.0090.03116.77
8.0.100.0070.03416.81
8.0.90.0110.03016.84
8.0.80.0120.03216.84
8.0.70.0070.03716.80
8.0.60.0130.03016.76
8.0.50.0110.03116.88
8.0.30.0110.03116.80
8.0.20.0100.03316.82
8.0.10.0130.02916.99
7.4.330.0070.02715.55
7.4.320.0070.03016.62
7.4.300.0140.03216.54
7.4.290.0160.03116.57
7.4.280.0140.03316.58
7.4.270.0040.04216.58
7.4.260.0120.03416.63
7.4.250.0120.03616.60
7.4.240.0150.03316.49
7.4.230.0070.04116.62
7.4.220.0110.03316.54
7.4.210.0090.03716.46
7.4.200.0120.03416.64
7.4.190.0120.03316.59
7.4.180.0180.02716.60
7.4.160.0090.03616.41
7.4.150.0100.03416.46
7.4.140.0100.03516.42
7.4.130.0100.03616.44
7.4.120.0110.03316.41
7.4.110.0120.03316.57
7.4.100.0080.03616.47
7.4.90.0090.03516.45
7.4.80.0080.03516.50
7.4.70.0090.03516.50
7.4.60.0150.02916.52
7.4.50.0120.02916.40
7.4.40.0050.03716.40
7.4.30.0100.03216.42
7.4.20.0070.03416.40
7.4.10.0030.03916.44
7.4.00.0050.03716.42

preferences:
35.93 ms | 403 KiB | 5 Q