3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['foo'=>'bar']; //PHP5 style $message = isset($array['foo']) ? $array['foo'] : 'not set'; echo $message.PHP_EOL; //PHP7 style $message = $array['foo'] ?? 'not set'; echo $message.PHP_EOL;

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.3.60.0180.00316.50
8.3.50.0070.00718.09
8.3.40.0120.00618.51
8.3.30.0110.00718.34
8.3.20.0000.00721.82
8.3.10.0080.00023.61
8.3.00.0050.00319.43
8.2.180.0070.00716.63
8.2.170.0060.00922.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00019.38
8.2.120.0000.00726.35
8.2.110.0060.00319.39
8.2.100.0080.00417.58
8.2.90.0030.00517.63
8.2.80.0040.00418.78
8.2.70.0080.00017.63
8.2.60.0000.00817.38
8.2.50.0080.00017.34
8.2.40.0040.00419.23
8.2.30.0000.00719.36
8.2.20.0030.00617.90
8.2.10.0050.00317.97
8.2.00.0070.00018.03
8.1.280.0070.01425.92
8.1.270.0080.00023.91
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00922.66
8.1.230.0110.00020.93
8.1.220.0020.00517.74
8.1.210.0050.00318.77
8.1.200.0030.00617.00
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0030.00517.62
8.1.160.0040.00418.82
8.1.150.0000.00720.80
8.1.140.0000.00717.62
8.1.130.0000.00718.99
8.1.120.0000.00817.43
8.1.110.0050.00517.21
8.1.100.0000.00717.38
8.1.90.0030.00517.30
8.1.80.0030.00917.33
8.1.70.0000.00717.39
8.1.60.0040.00417.47
8.1.50.0040.00417.40
8.1.40.0040.00417.39
8.1.30.0080.00017.51
8.1.20.0040.00417.58
8.1.10.0000.00717.39
8.1.00.0040.00417.28
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0040.00418.36
8.0.270.0000.00717.09
8.0.260.0030.00318.99
8.0.250.0030.00316.91
8.0.240.0000.00816.78
8.0.230.0000.00816.85
8.0.220.0030.00316.71
8.0.210.0070.00016.77
8.0.200.0030.00316.75
8.0.190.0080.00016.90
8.0.180.0040.00816.72
8.0.170.0040.00416.85
8.0.160.0050.00216.86
8.0.150.0050.00316.81
8.0.140.0040.00416.79
8.0.130.0000.00613.20
8.0.120.0000.00816.78
8.0.110.0070.00016.79
8.0.100.0050.00216.62
8.0.90.0040.00416.61
8.0.80.0070.00716.87
8.0.70.0000.00716.78
8.0.60.0040.00416.82
8.0.50.0070.00016.70
8.0.30.0110.01016.98
8.0.20.0070.01217.40
8.0.10.0050.00216.82
8.0.00.0110.00616.63
7.4.330.0000.00515.55
7.4.320.0040.00416.53
7.4.300.0070.00016.47
7.4.290.0000.00816.53
7.4.280.0000.00816.39
7.4.270.0090.00016.55
7.4.260.0030.00316.52
7.4.250.0000.00716.48
7.4.240.0030.00616.42
7.4.230.0000.00716.60
7.4.220.0000.00816.50
7.4.210.0060.00816.41
7.4.200.0000.00716.64
7.4.160.0110.00616.39
7.4.140.0120.00617.86
7.4.130.0110.01116.44
7.4.120.0090.01116.45
7.4.110.0120.00616.32
7.4.100.0130.01016.41
7.4.90.0100.01016.33
7.4.80.0030.01819.39
7.4.70.0080.00816.48
7.4.60.0070.00816.43
7.4.50.0000.01816.41
7.4.40.0130.00816.35
7.4.00.0070.01014.76
7.3.330.0050.00012.96
7.3.320.0030.00312.93
7.3.310.0000.00716.12
7.3.300.0030.00316.08
7.3.290.0070.00016.13
7.3.280.0070.00916.16
7.3.260.0160.00516.28
7.3.240.0100.00716.25
7.3.230.0060.01616.16
7.3.210.0100.00716.20
7.3.200.0030.01216.13
7.3.190.0050.01116.13
7.3.180.0090.00616.09
7.3.170.0090.00616.53
7.3.160.0030.01316.16
7.2.330.0110.00716.33
7.2.320.0100.01016.14
7.2.310.0070.01116.44
7.2.300.0130.00316.09
7.2.290.0110.00716.58
7.2.60.0000.01116.71
7.2.50.0070.01016.75
7.2.40.1220.01717.60
7.2.30.1320.01317.75
7.2.20.1580.01217.82
7.2.10.0850.00817.91
7.2.00.1060.01117.49
7.1.200.0100.00315.52
7.1.160.1200.01016.71
7.1.150.1170.01116.64
7.1.140.0830.00916.65
7.1.130.1000.01216.35
7.1.120.1710.01516.75
7.1.110.1260.01315.80
7.1.100.0910.01116.15
7.1.90.1040.00915.88
7.1.80.1180.00916.31
7.1.70.1100.01415.17
7.1.60.1420.01433.22
7.1.50.1960.01632.62
7.1.40.1450.01832.68
7.1.30.1520.02832.51
7.1.20.1600.01532.52
7.1.10.1280.01314.47
7.1.00.1290.01614.58

preferences:
39.98 ms | 400 KiB | 5 Q