3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Compare two non numeric strings: ('str' == '0') = " . ('str' == '0' ? 'true' : 'false') . "\n"; echo "Compare non numeric string to intteger 0: ('str' == 0) = " . ('str' == 0 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic): ('1e1' == '10') = " . ('1e1' == '10' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision): ('0.9999999999999999' == '1') = " . ('0.9999999999999999' == '1' ? ' true' : 'false') . "\n"; echo "Compare two numeric strings (precision4): ('0.99999999999999994' == '1') = " . ('0.99999999999999994' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision5): ('0.99999999999999995' == '1') = " . ('0.99999999999999995' == '1' ? 'true' : 'false') . "\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.3.60.0070.01318.43
8.3.50.0090.01421.99
8.3.40.0100.00718.70
8.3.30.0030.01020.11
8.3.20.0060.00318.60
8.3.10.0040.00421.00
8.3.00.0050.00519.68
8.2.180.0070.00718.17
8.2.170.0120.00622.96
8.2.160.0070.01020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.04
8.2.110.0030.00620.32
8.2.100.0060.00617.73
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0030.00617.68
8.2.50.0000.00818.07
8.2.40.0080.00018.09
8.2.30.0030.00519.44
8.2.20.0000.00717.69
8.2.10.0040.00417.79
8.2.00.0000.00717.73
8.1.280.0030.01025.92
8.1.270.0070.00023.99
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.39
8.1.230.0070.00420.98
8.1.220.0050.00318.77
8.1.210.0040.00419.00
8.1.200.0000.00917.23
8.1.190.0040.00417.53
8.1.180.0060.00318.10
8.1.170.0040.00418.71
8.1.160.0030.00518.72
8.1.150.0000.00718.48
8.1.140.0050.00317.30
8.1.130.0030.00317.82
8.1.120.0030.00417.44
8.1.110.0040.00417.28
8.1.100.0000.00717.29
8.1.90.0000.00717.42
8.1.80.0000.00817.46
8.1.70.0070.00017.29
8.1.60.0070.00417.40
8.1.50.0070.00017.39
8.1.40.0000.00717.34
8.1.30.0000.00717.54
8.1.20.0040.00417.57
8.1.10.0000.00717.30
8.1.00.0000.00717.39
8.0.300.0040.00419.95
8.0.290.0030.00517.05
8.0.280.0030.00318.38
8.0.270.0030.00317.10
8.0.260.0060.00016.81
8.0.250.0000.00816.96
8.0.240.0000.00817.03
8.0.230.0070.00016.86
8.0.220.0040.00416.75
8.0.210.0070.00016.93
8.0.200.0000.00616.84
8.0.190.0050.00216.86
8.0.180.0040.00416.95
8.0.170.0030.00316.83
8.0.160.0070.00016.93
8.0.150.0050.00216.70
8.0.140.0000.00716.87
8.0.130.0070.00013.25
8.0.120.0030.00616.78
8.0.110.0070.00016.88
8.0.100.0040.00416.91
8.0.90.0050.00216.68
8.0.80.0040.01816.82
8.0.70.0030.00516.70
8.0.60.0000.00816.71
8.0.50.0020.00516.73
8.0.30.0050.01416.97
8.0.20.0110.00917.40
8.0.10.0040.00416.85
8.0.00.0160.00216.63
7.4.330.0050.00016.72
7.4.320.0030.00316.40
7.4.300.0050.00516.49
7.4.290.0000.00716.23
7.4.280.0000.00816.36
7.4.270.0040.00416.29
7.4.260.0000.00613.09
7.4.250.0040.00416.36
7.4.240.0000.00716.48
7.4.230.0030.00316.48
7.4.220.0030.02016.31
7.4.210.0060.00816.42
7.4.200.0030.00316.27
7.4.190.0000.00816.43
7.4.160.0060.01216.34
7.4.150.0040.01317.40
7.4.140.0130.00517.86
7.4.130.0090.00916.49
7.4.120.0150.00316.37
7.4.110.0150.00616.46
7.4.100.0140.00316.46
7.4.90.0130.01016.32
7.4.80.0080.00819.39
7.4.70.0130.00316.40
7.4.60.0060.00916.53
7.4.50.0000.00516.27
7.4.40.0040.01122.77
7.4.30.0070.01416.37
7.4.00.0130.00014.94
7.3.330.0040.00313.00
7.3.320.0000.00513.18
7.3.310.0020.00516.08
7.3.300.0030.00316.30
7.3.290.0100.00916.29
7.3.280.0080.00816.27
7.3.270.0150.00917.40
7.3.260.0090.00818.24
7.3.250.0130.00516.31
7.3.240.0090.00916.21
7.3.230.0080.00816.59
7.3.210.0090.00716.48
7.3.200.0050.01119.39
7.3.190.0080.00816.32
7.3.180.0040.01216.27
7.3.170.0060.00916.27
7.3.160.0110.00416.18
7.3.120.0000.01414.63
7.3.10.0060.00916.66
7.3.00.0120.00316.59
7.2.330.0100.00716.53
7.2.320.0120.00616.60
7.2.310.0090.00916.33
7.2.300.0060.01216.57
7.2.290.0090.00616.71
7.2.130.0060.00916.98
7.2.120.0030.01016.89
7.2.110.0130.00317.00
7.2.100.0070.00716.99
7.2.90.0030.01016.71
7.2.80.0080.00816.96
7.2.70.0120.00016.75
7.2.60.0070.00716.72
7.2.50.0080.00816.63
7.2.40.0040.01116.73
7.2.30.0030.01316.65
7.2.20.0000.01617.00
7.2.10.0080.00816.64
7.2.00.0040.00718.07
7.1.250.0070.00715.68
7.1.200.0070.00715.52
7.1.100.0030.01418.13
7.1.70.0000.00916.89
7.1.60.0030.00716.80
7.1.50.0070.01416.86
7.1.00.0030.03722.50
7.0.200.0040.01116.71
7.0.140.0030.07022.10
7.0.60.0030.04019.94
7.0.50.0070.08017.80
7.0.40.0230.07320.20
7.0.30.0230.04720.30
7.0.20.0200.04320.16
7.0.10.0000.04720.20
7.0.00.0030.09020.17
5.6.280.0000.07721.07
5.6.210.0130.07320.43
5.6.200.0130.08318.21
5.6.190.0130.07320.47
5.6.180.3200.03720.77
5.6.170.0370.06720.54
5.6.160.0100.04020.38
5.6.150.0170.07018.18
5.6.140.0070.05018.12
5.6.130.0170.03718.18
5.6.120.0000.08720.96
5.6.110.0170.06020.88
5.6.100.0070.06021.11
5.6.90.0030.07720.94
5.6.80.0100.06020.41
5.6.70.4530.04020.38
5.5.350.0330.06020.43
5.5.340.0070.07317.89
5.5.330.0170.07320.25
5.5.320.0370.04020.31
5.5.310.0300.07320.30
5.5.300.0000.04717.98
5.5.290.0070.07717.91
5.5.280.0030.04720.83
5.5.270.0030.04720.67
5.5.260.0100.08020.76
5.5.250.0130.05020.77
5.5.240.0170.07020.18
5.4.450.3500.03719.13
5.4.440.3030.03719.47
5.4.430.3470.03719.10
5.4.420.3330.03719.58
5.4.410.3230.04018.98
5.4.400.3430.04019.25
5.4.390.3600.03719.13
5.4.380.3230.03718.91
5.4.370.3230.04018.88
5.4.360.3570.03718.88
5.4.350.3270.03719.08
5.4.340.3200.04019.09
5.4.320.3630.03019.05
5.4.310.3570.03719.05
5.4.300.3500.03318.77
5.4.290.3500.03318.91
5.4.280.3630.03318.90
5.4.270.3430.03319.03
5.4.260.3300.03719.08
5.4.250.3230.04319.07
5.4.240.3330.04019.08
5.4.230.4570.04018.80
5.4.220.3570.04018.87
5.4.210.3400.03718.91
5.4.200.3400.03018.76
5.4.190.3470.03718.92
5.4.180.3370.03319.23
5.4.170.3270.04019.11
5.4.160.3370.03018.89
5.4.150.3530.03318.74
5.4.140.3100.03016.26
5.4.130.3500.03316.21
5.4.120.3330.03716.34
5.4.110.3370.03716.39
5.4.100.3730.03316.23
5.4.90.3400.03016.40
5.4.80.3700.04316.47
5.4.70.3270.03716.29
5.4.60.3230.03316.31
5.4.50.3430.04016.49
5.4.40.3500.02716.34
5.4.30.3600.04716.18
5.4.20.3570.03316.35
5.4.10.3270.03016.05
5.4.00.3300.03015.94
5.3.290.3930.03314.64
5.3.280.3800.04714.43
5.3.270.3430.03714.54
5.3.260.3270.03714.44
5.3.250.3270.03314.43
5.3.240.3400.03714.60
5.3.230.3230.03714.54
5.3.220.3470.04014.42
5.3.210.3270.03714.41
5.3.200.3470.03714.52
5.3.190.3530.03714.47
5.3.180.3530.03314.43
5.3.170.3130.03714.41
5.3.160.3400.03714.50
5.3.150.3570.03014.50
5.3.140.3770.03714.64
5.3.130.3500.03014.51
5.3.120.3630.04314.48
5.3.110.3800.04314.50
5.3.100.3530.02713.89
5.3.90.3500.03713.96
5.3.80.3530.04013.88
5.3.70.3330.04014.03
5.3.60.3330.04014.01
5.3.50.3400.03013.92
5.3.40.3400.03714.04
5.3.30.3730.03013.70
5.3.20.3370.03013.54
5.3.10.3400.03013.51
5.3.00.3570.03313.47
5.2.170.3170.03011.21
5.2.160.3030.02311.00
5.2.150.3030.03311.00
5.2.140.3170.03310.97
5.2.130.2700.03011.10
5.2.120.3000.03010.99
5.2.110.2930.03010.98
5.2.100.2670.02710.98
5.2.90.2970.02710.99
5.2.80.2970.02710.93
5.2.70.2830.03310.89
5.2.60.3070.03010.98
5.2.50.2930.03310.92
5.2.40.2570.02710.82
5.2.30.2300.04010.80
5.2.20.2600.02311.00
5.2.10.2470.02710.77
5.2.00.2600.02310.66
5.1.60.2470.03010.03
5.1.50.2170.02310.14
5.1.40.2530.02310.02
5.1.30.2330.02310.30
5.1.20.2500.02710.45
5.1.10.2270.02310.14
5.1.00.2300.0339.94
5.0.50.1270.0208.58
5.0.40.1070.0238.58
5.0.30.1430.0378.58
5.0.20.1230.0178.58
5.0.10.1300.0278.58
5.0.00.1330.0278.58
4.4.90.1070.0208.58
4.4.80.1230.0208.58
4.4.70.1370.0108.58
4.4.60.1430.0138.58
4.4.50.1230.0178.58
4.4.40.1070.0278.58
4.4.30.0830.0138.58
4.4.20.1100.0178.58
4.4.10.1370.0138.58
4.4.00.1400.0278.58
4.3.110.1170.0138.58
4.3.100.1370.0208.58
4.3.90.0830.0138.58
4.3.80.1130.0238.58
4.3.70.1130.0138.58
4.3.60.0900.0178.58
4.3.50.1130.0138.58
4.3.40.1300.0278.58
4.3.30.0730.0308.58
4.3.20.0600.0178.58
4.3.10.0630.0208.58
4.3.00.0700.0278.58

preferences:
45.95 ms | 401 KiB | 5 Q