3v4l.org

run code in 300+ PHP versions simultaneously
<?php // on first glance, the following appears to output 'true' echo (true?'true':false?'t':'f'); // however, the actual output of the above is 't' // this is because ternary expressions are evaluated from left to right // the following is a more obvious version of the same code as above echo ((true ? 'true' : false) ? 't' : 'f'); // here, you can see that the first expression is evaluated to 'true', which // in turn evaluates to (bool)true, thus returning the true branch of the // second ternary expression.

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.0070.01018.53
8.3.50.0100.00821.19
8.3.40.0110.00418.73
8.3.30.0120.00618.75
8.3.20.0050.00220.13
8.3.10.0000.00723.70
8.3.00.0000.00819.38
8.2.180.0070.01416.38
8.2.170.0060.01522.96
8.2.160.0060.00620.52
8.2.150.0080.00024.18
8.2.140.0030.00724.66
8.2.130.0040.00426.16
8.2.120.0000.00822.06
8.2.110.0060.00320.35
8.2.100.0080.00317.91
8.2.90.0030.00617.86
8.2.80.0080.00017.97
8.2.70.0070.00317.38
8.2.60.0030.00517.68
8.2.50.0030.00518.07
8.2.40.0000.00817.91
8.2.30.0040.00418.06
8.2.20.0070.00017.60
8.2.10.0040.00417.92
8.2.00.0030.00617.55
8.1.280.0150.00725.92
8.1.270.0040.00423.71
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00022.14
8.1.230.0080.00320.83
8.1.220.0040.00417.74
8.1.210.0000.00818.79
8.1.200.0000.00917.10
8.1.190.0040.00417.11
8.1.180.0050.00318.10
8.1.170.0060.00318.51
8.1.160.0080.00021.89
8.1.150.0030.00518.74
8.1.140.0000.00817.34
8.1.130.0030.00317.74
8.1.120.0070.00017.25
8.1.110.0040.00417.25
8.1.100.0000.00717.32
8.1.90.0000.00717.32
8.1.80.0040.00417.22
8.1.70.0000.00717.29
8.1.60.0040.00417.46
8.1.50.0000.00917.37
8.1.40.0000.00717.30
8.1.30.0040.00417.47
8.1.20.0040.00417.34
8.1.10.0040.00417.35
8.1.00.0040.00417.20
8.0.300.0080.00020.04
8.0.290.0040.00416.63
8.0.280.0000.00718.20
8.0.270.0000.00717.03
8.0.260.0040.00417.17
8.0.250.0030.00316.74
8.0.240.0060.00316.89
8.0.230.0000.00716.75
8.0.220.0050.00316.86
8.0.210.0050.00216.79
8.0.200.0030.00316.86
8.0.190.0080.00016.76
8.0.180.0030.00316.87
8.0.170.0050.00316.84
8.0.160.0000.00816.74
8.0.150.0030.00316.76
8.0.140.0060.00316.79
8.0.130.0030.00313.24
8.0.120.0040.00416.68
8.0.110.0040.00416.74
8.0.100.0000.00716.76
8.0.90.0030.00416.70
8.0.80.0100.00716.80
8.0.70.0070.00016.84
8.0.60.0000.00716.93
8.0.50.0000.00716.66
8.0.30.0110.00916.98
8.0.20.0100.00917.40
8.0.10.0040.00416.97
8.0.00.0030.01316.60
7.4.330.0050.00015.02
7.4.320.0070.00016.39
7.4.300.0000.00616.46
7.4.290.0030.00316.37
7.4.280.0040.00416.48
7.4.270.0030.00316.41
7.4.260.0030.00316.49
7.4.250.0040.00416.34
7.4.240.0020.00516.33
7.4.230.0070.00016.49
7.4.220.0030.01316.37
7.4.210.0030.01016.47
7.4.200.0040.00416.57
7.4.160.0100.00616.54
7.4.150.0090.01317.40
7.4.140.0090.00817.86
7.4.130.0110.00716.36
7.4.120.0100.00716.45
7.4.110.0190.00616.40
7.4.100.0030.01616.50
7.4.90.0100.00716.42
7.4.80.0080.00819.39
7.4.70.0030.01316.39
7.4.60.0090.00916.16
7.4.50.0030.00516.24
7.4.40.0060.01016.12
7.4.30.0070.01016.22
7.4.00.0000.01614.81
7.3.330.0020.00212.99
7.3.320.0000.00713.12
7.3.310.0000.00716.02
7.3.300.0000.00716.14
7.3.290.0070.00916.20
7.3.280.0060.01016.15
7.3.270.0030.01417.40
7.3.260.0150.00416.36
7.3.250.0040.01216.29
7.3.240.0100.00716.23
7.3.230.0040.01316.39
7.3.210.0030.01316.48
7.3.200.0140.00919.39
7.3.190.0100.00716.34
7.3.180.0090.00616.24
7.3.170.0000.01616.37
7.3.160.0090.00616.19
7.3.120.0100.00314.77
7.3.110.0140.00314.63
7.3.100.0040.01114.66
7.3.90.0030.01014.96
7.3.80.0060.00914.62
7.3.70.0040.01114.81
7.3.60.0060.01014.58
7.3.50.0000.01414.77
7.3.40.0060.01014.58
7.3.30.0100.00714.67
7.3.20.0000.01216.40
7.3.10.0030.00516.30
7.3.00.0000.01316.67
7.2.330.0120.00616.21
7.2.320.0040.01616.48
7.2.310.0140.00316.35
7.2.300.0170.00316.48
7.2.290.0150.00616.55
7.2.250.0070.01114.48
7.2.240.0040.01515.06
7.2.230.0030.01315.04
7.2.220.0060.01214.72
7.2.210.0060.01015.11
7.2.200.0040.01114.79
7.2.190.0060.00314.60
7.2.180.0070.01014.79
7.2.170.0090.00614.85
7.2.60.0070.00716.79
7.2.00.0000.01219.14
7.1.330.0070.00715.77
7.1.320.0070.00715.67
7.1.310.0090.00615.74
7.1.300.0030.00915.58
7.1.290.0100.00315.69
7.1.280.0030.01015.80
7.1.270.0120.00615.75
7.1.260.0030.00915.34
7.1.200.0040.00415.59
7.1.100.0090.00618.13
7.1.70.0020.00517.07
7.1.60.0160.00619.19
7.1.50.0040.00816.57
7.1.00.0070.07022.58
7.0.200.0050.00516.69
7.0.140.0000.07722.01
7.0.100.0230.04319.98
7.0.90.0100.06320.01
7.0.80.0100.07719.95
7.0.70.0230.06019.89
7.0.60.0000.05319.93
7.0.50.0100.07720.29
7.0.40.0130.06720.08
7.0.30.0070.08320.14
7.0.20.0100.08020.00
7.0.10.0200.07020.13
7.0.00.0100.08020.05
5.6.280.0030.07321.07
5.6.250.0070.06320.66
5.6.240.0070.07020.69
5.6.230.0070.07020.62
5.6.220.0030.04320.57
5.6.210.0070.05720.55
5.6.200.0000.08320.96
5.6.190.0000.08720.98
5.6.180.0070.08321.04
5.6.170.0030.04021.10
5.6.160.0130.07721.03
5.6.150.0070.07321.07
5.6.140.0030.04721.05
5.6.130.0030.04321.00
5.6.120.0100.07720.99
5.6.110.0130.08320.95
5.6.100.0030.09020.95
5.6.90.0000.08721.04
5.6.80.0070.06720.43
5.6.70.0030.04320.50
5.6.60.0030.04020.38
5.6.50.0100.03320.54
5.6.40.0100.03720.46
5.6.30.0070.03720.46
5.6.20.0000.04320.38
5.6.10.0070.03720.48
5.6.00.0100.03720.45
5.5.380.0070.04320.43
5.5.370.0100.04320.39
5.5.360.0100.04320.34
5.5.350.0100.03320.45
5.5.340.0130.07720.89
5.5.330.0030.06720.86
5.5.320.0170.07020.91
5.5.310.0030.04320.76
5.5.300.0030.04320.63
5.5.290.0030.05320.88
5.5.280.0070.04720.82
5.5.270.0030.05320.63
5.5.260.0130.09020.78
5.5.250.0130.07720.63
5.5.240.0030.04320.11
5.5.230.0030.04020.26
5.5.220.0000.04320.16
5.5.210.0100.03719.98
5.5.200.0030.03720.25
5.5.190.0030.04020.12
5.5.180.0100.03320.17
5.5.160.0100.03320.24
5.5.150.0070.03720.22
5.5.140.0070.03020.07
5.5.130.0000.05320.23
5.5.120.0070.03720.20
5.5.110.0070.04020.10
5.5.100.0030.04020.00
5.5.90.0030.03720.02
5.5.80.0100.03320.05
5.5.70.0030.03020.09
5.5.60.0000.03320.05
5.5.50.0100.03020.06
5.5.40.0030.03320.14
5.5.30.0030.03319.92
5.5.20.0100.02720.13
5.5.10.0070.03020.06
5.5.00.0000.04319.95
5.4.450.0070.07719.47
5.4.440.0070.04319.42
5.4.430.0130.06319.44
5.4.420.0130.04019.30
5.4.410.0130.07319.14
5.4.400.0070.04018.98
5.4.390.0030.04019.04
5.4.380.0000.04019.14
5.4.370.0070.03718.96
5.4.360.0000.03719.09
5.4.350.0030.03718.79
5.4.340.0000.04019.05
5.4.320.0000.04319.03
5.4.310.0030.04018.90
5.4.300.0030.04319.05
5.4.290.0030.04019.03
5.4.280.0100.03319.02
5.4.270.0170.02319.12
5.4.260.0070.03019.02
5.4.250.0000.04018.83
5.4.240.0030.03019.07
5.4.230.0000.04019.13
5.4.220.0000.04018.80
5.4.210.0030.03719.07
5.4.200.0100.02319.04
5.4.190.0000.03318.95
5.4.180.0000.03319.03
5.4.170.0170.02718.97
5.4.160.0000.03319.02
5.4.150.0000.03318.92
5.4.140.0070.03016.32
5.4.130.0070.02716.34
5.4.120.0100.02716.26
5.4.110.0030.03316.41
5.4.100.0030.03016.23
5.4.90.0070.02716.32
5.4.80.0030.03016.28
5.4.70.0100.02316.24
5.4.60.0030.03016.24
5.4.50.0000.03316.18
5.4.40.0170.02016.18
5.4.30.0070.02716.34
5.4.20.0000.03016.23
5.4.10.0030.03316.18
5.4.00.0030.06715.66
5.3.290.0070.03714.63
5.3.280.0000.04014.53
5.3.270.0030.03314.45
5.3.260.0000.03314.58
5.3.250.0000.04314.58
5.3.240.0030.03014.54
5.3.230.0030.03314.43
5.3.220.0100.02314.53
5.3.210.0030.03714.39
5.3.200.0030.03314.52
5.3.190.0000.03714.39
5.3.180.0070.02714.55
5.3.170.0100.02314.50
5.3.160.0030.03014.41
5.3.150.0030.03014.41
5.3.140.0000.03314.51
5.3.130.0030.03314.53
5.3.120.0030.03014.41
5.3.110.0100.03714.38
5.3.100.0100.07313.85
5.3.90.0000.07713.95
5.3.80.0030.07713.92
5.3.70.0030.06713.77
5.3.60.0070.06713.86
5.3.50.0030.08013.88
5.3.40.0070.07313.90
5.3.30.0030.07013.67
5.3.20.0070.04013.54
5.3.10.0100.04013.64
5.3.00.0100.04313.57
5.2.170.0000.06012.16
5.2.160.0030.05712.16
5.2.150.0030.03712.16
5.2.140.0030.03712.16
5.2.130.0030.05712.16
5.2.120.0070.03312.16
5.2.110.0000.06712.16
5.2.100.0000.04012.16
5.2.90.0070.03312.16
5.2.80.0030.06712.16
5.2.70.0030.03712.16
5.2.60.0000.04712.16
5.2.50.0000.04012.16
5.2.40.0130.04312.16
5.2.30.0000.04712.16
5.2.20.0170.02312.16
5.2.10.0000.03312.16
5.2.00.0030.04312.16
5.1.60.0030.03712.16
5.1.50.0130.03712.16
5.1.40.0030.03312.16
5.1.30.0000.04712.16
5.1.20.0030.03012.16
5.1.10.0030.05712.16
5.1.00.0000.04012.16
5.0.50.0070.03312.16
5.0.40.0030.02012.16
5.0.30.0070.03712.16
5.0.20.0000.04712.16
5.0.10.0000.04712.16
5.0.00.0000.03712.16
4.4.90.0030.03012.16
4.4.80.0000.01712.16
4.4.70.0030.03012.16
4.4.60.0030.02312.16
4.4.50.0030.02012.16
4.4.40.0000.03012.16
4.4.30.0000.03312.16
4.4.20.0030.03012.16
4.4.10.0000.03712.16
4.4.00.0030.03312.16
4.3.110.0030.03712.16
4.3.100.0070.01312.16
4.3.90.0070.03312.16
4.3.80.0000.04712.16
4.3.70.0100.02312.16
4.3.60.0070.03312.16
4.3.50.0000.02012.16
4.3.40.0030.02712.16
4.3.30.0070.03012.16
4.3.20.0000.03012.16
4.3.10.0070.03012.16
4.3.00.0000.02712.16

preferences:
46.71 ms | 401 KiB | 5 Q