3v4l.org

run code in 300+ PHP versions simultaneously
<?php $param = null; // $active evaluates to true $active = is_null($param) ? true : false; echo "Simple ternary result = $active". PHP_EOL; // $active evaluates to true $active = is_null($param) ? true : (is_string($param)? (strtolower($param) === 'true'): true); echo "Nested ternary result = $active"; ?>

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.0120.00919.59
8.4.150.0020.00014.05
8.4.140.0130.00817.30
8.4.130.0120.00717.81
8.4.120.0050.00320.36
8.4.110.0120.00822.41
8.4.100.0150.00417.57
8.4.90.0130.00918.68
8.4.80.0100.00917.66
8.4.70.0040.00417.70
8.4.60.0100.01118.69
8.4.50.0060.00317.42
8.4.40.0070.01317.68
8.4.30.0040.00417.48
8.4.20.0130.00718.64
8.4.10.0130.00317.71
8.3.280.0120.00818.31
8.3.270.0150.00416.57
8.3.260.0130.00716.16
8.3.250.0120.00719.08
8.3.240.0110.00816.40
8.3.230.0120.00816.34
8.3.220.0120.00617.04
8.3.210.0100.00916.75
8.3.200.0080.00016.76
8.3.190.0100.00916.83
8.3.180.0110.01016.35
8.3.170.0130.00719.19
8.3.160.0140.00416.69
8.3.150.0070.01120.71
8.3.140.0060.00318.45
8.3.130.0000.01018.30
8.3.120.0040.01118.85
8.3.110.0080.00020.94
8.3.100.0080.00024.06
8.3.90.0040.00426.77
8.3.80.0060.00617.97
8.3.70.0120.00918.38
8.3.60.0030.01318.55
8.3.50.0110.00618.34
8.3.40.0090.00618.71
8.3.30.0070.00718.80
8.3.20.0040.00418.68
8.3.10.0030.00521.69
8.3.00.0060.00321.75
8.2.290.0120.00722.19
8.2.280.0070.00120.19
8.2.270.0110.00417.27
8.2.260.0040.01518.34
8.2.250.0000.00816.40
8.2.240.0030.00616.93
8.2.230.0070.00322.58
8.2.220.0030.00637.54
8.2.210.0110.00726.77
8.2.200.0070.00316.50
8.2.190.0040.01516.58
8.2.180.0070.00718.30
8.2.170.0040.01118.82
8.2.160.0070.00722.96
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0080.00022.27
8.2.120.0000.00826.35
8.2.110.0070.00320.94
8.2.100.0120.00017.91
8.2.90.0060.00318.03
8.2.80.0000.00917.97
8.2.70.0040.00417.50
8.2.60.0070.00417.61
8.2.50.0040.00419.23
8.2.40.0000.00819.48
8.2.30.0040.00420.50
8.2.20.0050.00218.13
8.2.10.0060.00317.93
8.2.00.0000.00719.42
8.1.330.0100.00721.88
8.1.320.0120.00915.95
8.1.310.0060.00316.53
8.1.300.0060.00318.11
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0040.00420.29
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0140.00422.09
8.1.230.0090.00320.86
8.1.220.0000.00817.78
8.1.210.0080.00018.97
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0060.00318.10
8.1.170.0000.01018.54
8.1.160.0000.00718.88
8.1.150.0000.00718.79
8.1.140.0000.00718.80
8.1.130.0100.00020.17
8.1.120.0000.00817.47
8.1.110.0000.01017.27
8.1.100.0040.00417.34
8.1.90.0080.00717.38
8.1.80.0040.00417.37
8.1.70.0000.00717.46
8.1.60.0030.00617.54
8.1.50.0110.00017.47
8.1.40.0000.00917.55
8.1.30.0030.00517.61
8.1.20.0080.00017.58
8.1.10.0030.00617.52
8.1.00.0080.00017.46
8.0.300.0060.00320.04
8.0.290.0060.00316.58
8.0.280.0050.00318.45
8.0.270.0070.00017.21
8.0.260.0030.00318.40
8.0.250.0060.00016.96
8.0.240.0040.00416.93
8.0.230.0040.00416.91
8.0.220.0090.00016.78
8.0.210.0000.00716.89
8.0.200.0080.00016.92
8.0.190.0070.00016.98
8.0.180.0050.00316.94
8.0.170.0030.00616.90
8.0.160.0000.00716.91
8.0.150.0030.00316.86
8.0.140.0000.00716.74
8.0.130.0030.00313.34
8.0.120.0070.00016.90
8.0.110.0040.00416.73
8.0.100.0050.00216.88
8.0.90.0030.00316.80
8.0.80.0060.00916.86
8.0.70.0070.00016.71
8.0.60.0040.00416.64
8.0.50.0040.00416.86
8.0.30.0080.01116.99
8.0.20.0130.01017.40
8.0.10.0070.00016.93
8.0.00.0110.00716.83
7.4.330.0020.00215.55
7.4.320.0060.00016.49
7.4.300.0000.00616.57
7.4.290.0030.00316.33
7.4.280.0000.00716.54
7.4.270.0040.00416.35
7.4.260.0000.00716.42
7.4.250.0070.00016.54
7.4.240.0000.00716.48
7.4.230.0040.00416.43
7.4.220.0060.00316.18
7.4.210.0140.00616.60
7.4.200.0040.00416.53
7.4.160.0070.01116.45
7.4.140.0100.00917.86
7.4.130.0090.00916.59
7.4.120.0100.01016.43
7.4.110.0100.00716.42
7.4.100.0030.01816.57
7.4.90.0120.00716.32
7.4.80.0070.01019.39
7.4.70.0100.00616.43
7.4.60.0100.01016.29
7.4.50.0150.00316.36
7.4.40.0120.00916.38
7.4.00.0100.00615.10
7.3.330.0050.00013.00
7.3.320.0000.00513.23
7.3.310.0030.00616.22
7.3.300.0030.00316.15
7.3.290.0030.00316.11
7.3.280.0120.00916.23
7.3.260.0110.00816.42
7.3.240.0120.00816.31
7.3.230.0100.00716.34
7.3.210.0180.00416.48
7.3.200.0060.01216.27
7.3.190.0110.00516.43
7.3.180.0030.01316.14
7.3.170.0130.00416.23
7.3.160.0080.01416.32
7.3.120.0070.01014.96
7.3.110.0080.00814.68
7.3.100.0060.00614.66
7.3.90.0070.00714.89
7.3.80.0100.00314.85
7.3.70.0080.00414.66
7.3.60.0110.00314.66
7.3.50.0040.01114.78
7.3.40.0030.01014.68
7.3.30.0030.00615.01
7.3.20.0030.00616.55
7.3.10.0060.00616.61
7.3.00.0080.00416.43
7.2.330.0110.00716.55
7.2.320.0200.00016.74
7.2.310.0060.01316.31
7.2.300.0150.00716.71
7.2.290.0130.00516.67
7.2.250.0090.00914.91
7.2.240.0030.01714.46
7.2.230.0050.00514.88
7.2.220.0030.00614.71
7.2.210.0090.00615.12
7.2.200.0030.00715.09
7.2.190.0120.00014.71
7.2.180.0090.00014.76
7.2.170.0030.01014.84
7.2.100.1610.01014.67
7.2.90.0990.00914.70
7.2.80.1290.01314.91
7.2.70.1360.01315.21
7.2.60.1000.01315.12
7.2.50.1480.00314.85
7.2.40.1440.00614.96
7.2.30.0840.01014.89
7.2.20.0900.01014.89
7.2.10.1000.00715.13
7.2.00.1110.00714.91
7.1.330.0080.00415.54
7.1.320.0000.01315.89
7.1.310.0060.00615.39
7.1.300.0050.00315.59
7.1.290.0000.01015.68
7.1.280.0030.00615.78
7.1.270.0060.00615.84
7.1.260.0090.00315.70
7.1.220.0960.00313.85
7.1.210.1250.01013.70
7.1.200.0980.01014.05
7.1.190.1280.01014.05
7.1.180.1060.00313.84
7.1.170.1380.00614.05
7.1.160.1200.00613.70
7.1.150.0970.00313.52
7.1.140.0930.00313.86
7.1.130.1120.00713.48
7.1.120.1220.00313.59
7.1.110.1100.00313.89
7.1.100.1250.00013.48
7.1.90.1160.00313.59
7.1.80.1290.00013.67
7.1.70.1980.01013.78
7.1.60.1350.01031.51
7.1.50.1440.00031.86
7.1.40.1300.01031.80
7.1.30.1280.00731.69
7.1.20.1460.01031.85
7.1.10.1260.00314.09
7.1.00.1070.01014.13

preferences:
30.46 ms | 403 KiB | 5 Q