3v4l.org

run code in 300+ PHP versions simultaneously
<?php $q1 = ''; $q2 = 'A'; $q3 = ''; $q4 = 'E'; $q5 = 'D'; for($i=1; $i <= 5; $i++) { if (${"q$i"} == '') ${"q$i"} = 'X'; } echo "$q1\n"; echo "$q2\n"; echo "$q3\n"; echo "$q4\n"; echo "$q5\n";

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.5.00.0130.00819.81
8.4.150.0020.00014.05
8.4.140.0150.00817.47
8.4.130.0080.01217.46
8.4.120.0120.00820.54
8.4.110.0110.00919.18
8.4.100.0130.00917.73
8.4.90.0080.00217.78
8.4.80.0120.00817.95
8.4.70.0070.00317.60
8.4.60.0120.01020.54
8.4.50.0110.00917.73
8.4.40.0040.00919.42
8.4.30.0120.00622.32
8.4.20.0130.00718.54
8.4.10.0090.00019.47
8.3.280.0070.01420.11
8.3.270.0110.01216.51
8.3.260.0060.00816.56
8.3.250.0090.01017.12
8.3.240.0080.00916.53
8.3.230.0110.00416.70
8.3.220.0050.00317.12
8.3.210.0060.01016.40
8.3.200.0140.00616.61
8.3.190.0080.01017.22
8.3.180.0140.00416.70
8.3.170.0120.00616.54
8.3.160.0040.00418.72
8.3.150.0160.00317.21
8.3.140.0050.00318.61
8.3.130.0070.01118.36
8.3.120.0080.00419.06
8.3.110.0090.00616.77
8.3.100.0070.00724.06
8.3.90.0070.01126.77
8.3.80.0060.00317.97
8.3.70.0070.01016.50
8.3.60.0060.01218.38
8.3.50.0080.00518.13
8.3.40.0160.00018.68
8.3.30.0040.01118.60
8.3.20.0040.00420.71
8.3.10.0080.00020.36
8.3.00.0070.00020.87
8.2.290.0140.00520.13
8.2.280.0110.01018.44
8.2.270.0040.01116.65
8.2.260.0090.00918.81
8.2.250.0040.01118.48
8.2.240.0080.01118.59
8.2.230.0030.00620.94
8.2.220.0000.01037.54
8.2.210.0100.00326.77
8.2.200.0030.00718.02
8.2.190.0120.00318.10
8.2.180.0040.01418.17
8.2.170.0040.01122.96
8.2.160.0100.00320.64
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00018.03
8.2.120.0040.00426.35
8.2.110.0090.00020.94
8.2.100.0040.00817.84
8.2.90.0030.00518.34
8.2.80.0000.00818.22
8.2.70.0040.00417.50
8.2.60.0030.00617.63
8.2.50.0000.00817.63
8.2.40.0080.00019.35
8.2.30.0060.00317.71
8.2.20.0040.00418.06
8.2.10.0030.00519.43
8.2.00.0060.00317.97
8.1.330.0040.00421.68
8.1.320.0110.00916.23
8.1.310.0060.00316.53
8.1.300.0130.00618.26
8.1.290.0110.00030.84
8.1.280.0110.01125.92
8.1.270.0040.00420.14
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0080.00322.13
8.1.230.0070.00422.75
8.1.220.0040.00417.74
8.1.210.0030.00618.80
8.1.200.0000.00817.23
8.1.190.0050.00317.35
8.1.180.0030.00518.10
8.1.170.0020.00518.94
8.1.160.0030.00518.89
8.1.150.0070.00018.83
8.1.140.0000.00720.33
8.1.130.0030.00320.17
8.1.120.0000.00717.38
8.1.110.0040.00417.36
8.1.100.0000.00717.46
8.1.90.0040.00417.47
8.1.80.0080.00017.36
8.1.70.0090.00017.39
8.1.60.0030.00617.56
8.1.50.0060.00317.48
8.1.40.0040.00417.37
8.1.30.0000.00817.49
8.1.20.0040.00417.61
8.1.10.0040.00417.49
8.1.00.0050.00217.48
8.0.300.0000.01019.91
8.0.290.0040.00416.75
8.0.280.0000.00818.01
8.0.270.0000.00718.01
8.0.260.0050.00318.34
8.0.250.0000.00616.98
8.0.240.0040.00417.02
8.0.230.0050.00516.91
8.0.220.0040.00416.81
8.0.210.0040.00416.75
8.0.200.0040.00416.87
8.0.190.0060.00316.95
8.0.180.0040.00416.95
8.0.170.0000.00816.76
8.0.160.0030.00616.87
8.0.150.0000.00716.79
8.0.140.0000.00716.75
8.0.130.0070.00013.28
8.0.120.0000.00816.87
8.0.110.0030.00616.86
8.0.100.0030.00316.90
8.0.90.0000.00716.89
8.0.80.0030.01916.91
8.0.70.0040.00416.81
8.0.60.0040.00416.68
8.0.50.0000.00716.76
8.0.30.0140.00516.83
8.0.20.0090.01617.40
8.0.10.0000.00816.86
8.0.00.0080.01016.83
7.4.330.0050.00015.55
7.4.320.0030.00316.45
7.4.300.0030.00316.56
7.4.290.0000.00716.42
7.4.280.0030.00516.52
7.4.270.0070.00016.51
7.4.260.0030.00316.43
7.4.250.0050.00316.49
7.4.240.0030.00316.57
7.4.230.0030.00316.36
7.4.220.0070.00016.59
7.4.210.0060.00916.62
7.4.200.0000.00716.67
7.4.160.0080.00816.51
7.4.140.0160.00717.86
7.4.130.0090.00916.61
7.4.120.0080.01016.54
7.4.110.0070.01016.65
7.4.100.0120.00616.60
7.4.90.0100.01016.53
7.4.80.0130.00619.39
7.4.70.0050.01316.61
7.4.60.0100.00716.62
7.4.50.0030.00616.64
7.4.40.0090.00616.41
7.4.00.0030.01015.17
7.3.330.0050.00013.31
7.3.320.0060.00013.13
7.3.310.0030.00316.27
7.3.300.0070.00016.36
7.3.290.0040.00416.35
7.3.280.0110.00816.34
7.3.260.0110.00916.47
7.3.240.0110.00816.49
7.3.230.0090.00916.30
7.3.210.0060.01316.29
7.3.200.0070.01116.36
7.3.190.0060.01116.65
7.3.180.0030.01316.36
7.3.170.0080.01216.63
7.3.160.0090.00616.56
7.3.20.1550.00314.62
7.3.10.0490.01114.75
7.3.00.0640.01014.85
7.2.330.0060.01516.79
7.2.320.0090.00916.39
7.2.310.0040.01516.39
7.2.300.0130.00316.46
7.2.290.0110.01016.39
7.2.150.0650.01714.88
7.2.140.0600.00615.00
7.2.130.0610.01314.78
7.2.120.0480.00314.93
7.2.110.0610.00315.13
7.2.100.0600.00415.18
7.2.90.0570.00714.90
7.2.80.0500.00415.16
7.2.70.0580.00314.71
7.2.60.0500.00714.88
7.2.50.0460.00015.20
7.2.40.0590.00715.10
7.2.30.0570.00315.02
7.2.20.0480.00014.91
7.2.10.0380.00715.06
7.2.00.0440.00614.94
7.1.250.0660.00714.13

preferences:
32.41 ms | 403 KiB | 5 Q