3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Compare non numeric string to string 0: ('str' == '0') = " . ('str' == '0' ? 'true' : 'false') . "\n"; echo "Compare non numeric string to integer 0: ('str' == 0) = " . ('str' == 0 ? 'true' : 'false') . "\n"; echo "Compare evtl. numeric string to string: ('1string' == '1') = " . ('1string' == '1' ? 'true' : 'false') . "\n"; echo "Compare evtl. numeric string to number: ('1string' == 1) = " . ('1string' == 1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 1): ('1e1' == '10') = " . ('1e1' == '10' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 2): ('1E1' == '10') = " . ('1E1' == '10' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 3): ('1e-1' == '0.1') = " . ('1e-1' == '0.1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 4): ('1E-1' == '0.1') = " . ('1E-1' == '0.1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 5): ('+1' == '1') = " . ('+1' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 6): ('+0' == '-0') = " . ('+0' == '-0' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision 1): ('0.99999999999999994' == '1') = " . ('0.99999999999999994' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision 2): ('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.0090.00918.18
8.3.50.0120.00322.04
8.3.40.0120.00318.70
8.3.30.0070.00720.17
8.3.20.0070.00018.79
8.3.10.0050.00320.92
8.3.00.0080.00019.64
8.2.180.0140.00018.11
8.2.170.0000.01522.96
8.2.160.0110.00620.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.65
8.2.110.0040.00819.36
8.2.100.0080.00417.72
8.2.90.0030.00619.07
8.2.80.0060.00319.16
8.2.70.0050.00317.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00419.76
8.2.30.0080.00019.55
8.2.20.0000.00717.61
8.2.10.0000.00817.72
8.2.00.0070.00017.60
8.1.280.0140.00325.92
8.1.270.0070.00023.99
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0080.00420.74
8.1.230.0030.01020.85
8.1.220.0040.00418.77
8.1.210.0000.00918.98
8.1.200.0040.00417.23
8.1.190.0000.00717.41
8.1.180.0040.00418.10
8.1.170.0000.00818.53
8.1.160.0020.00518.83
8.1.150.0000.00818.53
8.1.140.0040.00417.34
8.1.130.0000.00717.79
8.1.120.0020.00517.40
8.1.110.0000.00817.44
8.1.100.0000.00717.49
8.1.90.0050.00317.47
8.1.80.0000.00717.32
8.1.70.0030.00317.43
8.1.60.0000.00817.55
8.1.50.0050.00217.50
8.1.40.0050.00317.41
8.1.30.0040.00417.54
8.1.20.0030.00517.64
8.1.10.0040.00417.43
8.1.00.0030.00617.44
8.0.300.0050.00519.78
8.0.290.0040.00417.18
8.0.280.0030.00318.34
8.0.270.0070.00017.11
8.0.260.0040.00416.76
8.0.250.0040.00416.92
8.0.240.0040.00416.88
8.0.230.0080.00016.98
8.0.220.0040.00416.99
8.0.210.0040.00416.82
8.0.200.0020.00517.01
8.0.190.0000.00716.98
8.0.180.0000.00716.86
8.0.170.0000.00816.77
8.0.160.0070.00016.95
8.0.150.0000.00716.82
8.0.140.0000.00716.91
8.0.130.0040.00413.31
8.0.120.0040.00416.89
8.0.110.0080.00016.73
8.0.100.0000.00716.96
8.0.90.0070.00016.97
8.0.80.0120.00416.89
8.0.70.0000.00716.88
8.0.60.0030.00616.74
8.0.50.0040.00416.82
8.0.30.0110.00717.08
8.0.20.0170.00317.40
8.0.10.0040.00416.94
8.0.00.0070.01016.73
7.4.330.0050.00016.81
7.4.320.0000.00816.43
7.4.300.0030.00716.51
7.4.290.0040.00416.30
7.4.280.0080.00016.48
7.4.270.0030.00316.38
7.4.260.0000.00613.20
7.4.250.0030.00616.44
7.4.240.0000.00716.55
7.4.230.0070.00016.59
7.4.220.0100.00716.46
7.4.210.0070.00816.42
7.4.200.0000.00716.61
7.4.190.0000.00716.29
7.4.160.0140.01016.34
7.4.150.0070.01317.40
7.4.140.0120.01017.86
7.4.130.0100.01016.41
7.4.120.0100.00716.52
7.4.110.0070.01516.61
7.4.100.0040.01516.48
7.4.90.0080.01116.49
7.4.80.0170.00619.39
7.4.70.0100.01016.38
7.4.60.0100.00716.42
7.4.50.0050.00316.30
7.4.40.0110.00422.77
7.4.30.0110.00716.41
7.4.00.0100.00314.70
7.3.330.0030.00313.18
7.3.320.0050.00013.00
7.3.310.0070.00016.39
7.3.300.0030.00316.31
7.3.290.0090.00616.30
7.3.280.0060.01016.24
7.3.270.0110.00617.40
7.3.260.0100.01118.24
7.3.250.0090.00816.21
7.3.240.0150.00716.54
7.3.230.0110.00516.39
7.3.210.0110.00716.68
7.3.200.0040.01419.39
7.3.190.0110.00716.52
7.3.180.0080.00816.55
7.3.170.0090.00616.40
7.3.160.0090.00616.30
7.3.120.0080.00815.00
7.2.330.0120.00616.35
7.2.320.0060.00916.69
7.2.310.0140.00416.64
7.2.300.0100.00916.61
7.2.290.0070.01016.74
7.2.110.0490.00516.23
7.2.60.0130.00316.98
7.1.200.0090.00015.43
7.1.70.0070.00317.01
7.1.60.0030.01017.22
7.1.50.0040.01816.71
7.1.00.0000.03722.37
7.0.200.0100.00616.80
7.0.140.0000.07722.09
7.0.80.0330.07319.96
7.0.70.0530.05719.95
7.0.60.0500.04319.95
7.0.50.0330.08320.31
7.0.40.0070.04319.99
7.0.30.0030.08720.07
7.0.20.0000.05320.18
7.0.10.0100.07720.10
7.0.00.0030.06320.17
5.6.280.0000.07721.12
5.6.230.0000.08320.66
5.6.220.0100.05020.65
5.6.210.0100.07720.44
5.6.200.0030.05020.94
5.6.190.0300.04721.05
5.6.180.0100.07721.04
5.6.170.0170.05021.08
5.6.160.0030.08321.14
5.6.150.0030.04321.02
5.6.140.0070.07721.11
5.6.130.0070.05021.04
5.6.120.0070.07721.17
5.6.110.0070.08020.95
5.6.100.0030.08321.09
5.6.90.0030.07321.06
5.6.80.0130.05720.41
5.6.70.0230.06720.42
5.6.60.0030.08720.33
5.6.50.0100.07020.41
5.6.40.0000.04720.38
5.6.30.0070.05720.50
5.6.20.0130.07720.37
5.6.10.0130.06720.47
5.6.00.0100.04720.37
5.5.370.0030.05020.48
5.5.360.0030.04720.49
5.5.350.0070.05020.46
5.5.340.0130.04320.91
5.5.330.0030.04320.92
5.5.320.0130.06320.77
5.5.310.0100.08320.63
5.5.300.0000.06020.89
5.5.290.0030.06320.81
5.5.280.0070.09020.89
5.5.270.0030.07320.91
5.5.260.0070.07020.86
5.5.250.0100.06720.75
5.5.240.0170.06020.11
5.5.230.0100.08020.20
5.5.220.0030.08720.17
5.5.210.0070.07020.30
5.5.200.0030.07020.25
5.5.190.0070.05320.00
5.5.180.0130.06720.22
5.5.160.0000.04720.18
5.5.150.0100.06720.26
5.5.140.0130.07720.21
5.5.130.0070.05320.15
5.5.120.0100.07320.21
5.5.110.0100.07020.13
5.5.100.0170.07020.08
5.5.90.0230.04019.95
5.5.80.0030.07020.02
5.5.70.0130.07720.01
5.5.60.0030.05020.11
5.5.50.0030.08320.06
5.5.40.0100.05720.06
5.5.30.0030.05720.09
5.5.20.0130.06720.09
5.5.10.0070.04720.04
5.5.00.0070.07320.02
5.4.450.0100.07719.47
5.4.440.0070.07319.41
5.4.430.0130.06719.35
5.4.420.0030.06719.45
5.4.410.0070.05719.40
5.4.400.0170.06319.14
5.4.390.0070.05718.95
5.4.380.0130.07019.02
5.4.370.0170.06319.04
5.4.360.0070.04318.90
5.4.350.0130.04718.99
5.4.340.0070.07719.14
5.4.320.0070.08019.07
5.4.310.0030.07719.09
5.4.300.0070.08019.14
5.4.290.0170.04319.03
5.4.280.0100.05018.98
5.4.270.0070.06719.00
5.4.260.0070.07718.89
5.4.250.0070.04318.77
5.4.240.0100.04019.02
5.4.230.0070.04019.05
5.4.220.0030.04018.80
5.4.210.0130.07718.89
5.4.200.0070.07719.22
5.4.190.0070.07019.06
5.4.180.0170.06318.95
5.4.170.0130.07019.23
5.4.160.0070.05719.01
5.4.150.0030.08019.07
5.4.140.0130.06716.33
5.4.130.0030.06716.34
5.4.120.0100.04716.25
5.4.110.0030.05316.45
5.4.100.0070.05316.38
5.4.90.0030.04016.32
5.4.80.0100.05716.39
5.4.70.0070.07316.21
5.4.60.0130.04716.29
5.4.50.0030.05316.36
5.4.40.0130.06716.25
5.4.30.0100.07016.37
5.4.20.0070.07016.43
5.4.10.0070.05316.18
5.4.00.0130.06715.77
5.3.290.0070.08014.52
5.3.280.0030.07714.59
5.3.270.0030.08014.48
5.3.260.0070.05714.58
5.3.250.0070.08314.48
5.3.240.0000.05714.61
5.3.230.0000.05314.61
5.3.220.0070.07714.54
5.3.210.0070.05014.53
5.3.200.0000.05314.42
5.3.190.0030.05714.54
5.3.180.0030.04714.39
5.3.170.0130.06314.55
5.3.160.0100.07314.56
5.3.150.0030.08014.44
5.3.140.0100.07014.51
5.3.130.0030.06014.52
5.3.120.0100.07014.52
5.3.110.0130.04714.42
5.3.100.0170.05314.06
5.3.90.0200.03313.85
5.3.80.0100.07014.03
5.3.70.0130.06714.02
5.3.60.0030.06713.79
5.3.50.0200.03713.91
5.3.40.0070.05713.87
5.3.30.0030.04713.78
5.3.20.0130.06313.69
5.3.10.0100.06313.66
5.3.00.0100.06013.64
5.2.170.0070.06013.58
5.2.160.0100.06013.58
5.2.150.0070.04713.58
5.2.140.0030.06713.58
5.2.130.0070.06313.58
5.2.120.0000.06013.58
5.2.110.0170.05713.58
5.2.100.0130.05313.58
5.2.90.0100.05713.58
5.2.80.0030.04713.58
5.2.70.0030.04013.58
5.2.60.0070.06013.58
5.2.50.0070.05313.58
5.2.40.0270.04313.58
5.2.30.0170.05013.58
5.2.20.0030.05013.58
5.2.10.0070.05013.58
5.2.00.0000.04013.58
5.1.60.0030.02713.58
5.1.50.0100.05013.58
5.1.40.0000.05713.58
5.1.30.0070.05313.58
5.1.20.0030.05713.58
5.1.10.0100.05013.58
5.1.00.0030.05713.58
5.0.50.0070.03713.58
5.0.40.0000.02313.58
5.0.30.0000.03313.58
5.0.20.0030.02013.58
5.0.10.0030.03713.58
5.0.00.0070.03713.58
4.4.90.0000.01713.58
4.4.80.0070.03013.58
4.4.70.0000.04013.58
4.4.60.0030.03013.58
4.4.50.0000.03713.58
4.4.40.0000.04313.58
4.4.30.0000.03313.58
4.4.20.0000.03013.58
4.4.10.0000.02713.58
4.4.00.0000.02713.58
4.3.110.0000.01713.58
4.3.100.0070.03013.58
4.3.90.0000.01713.58
4.3.80.0070.03313.58
4.3.70.0000.02013.58
4.3.60.0000.01713.58
4.3.50.0030.02713.58
4.3.40.0070.02313.58
4.3.30.0000.01713.58
4.3.20.0030.02713.58
4.3.10.0030.02013.58
4.3.00.0030.02713.58

preferences:
58.15 ms | 401 KiB | 5 Q