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 1): ('1e1' == '10') = " . ('1e1' == '10' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic 2): ('+1' == '1') = " . ('+1' == '1' ? '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.68
8.3.50.0120.00721.08
8.3.40.0070.01018.63
8.3.30.0070.01020.29
8.3.20.0060.00318.60
8.3.10.0050.00320.96
8.3.00.0000.00719.69
8.2.180.0090.00916.50
8.2.170.0110.00322.96
8.2.160.0130.01020.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00721.12
8.2.110.0030.00622.11
8.2.100.0080.00419.45
8.2.90.0050.00317.75
8.2.80.0040.00418.71
8.2.70.0000.00819.35
8.2.60.0060.00317.63
8.2.50.0060.00317.55
8.2.40.0040.00419.35
8.2.30.0000.00717.69
8.2.20.0000.00717.70
8.2.10.0040.00417.62
8.2.00.0000.00817.67
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0050.00226.35
8.1.250.0000.00828.09
8.1.240.0100.00020.35
8.1.230.0070.00417.64
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0080.00017.23
8.1.180.0060.00318.10
8.1.170.0030.00617.62
8.1.160.0040.00418.74
8.1.150.0000.00718.50
8.1.140.0000.00717.39
8.1.130.0050.00317.71
8.1.120.0030.00317.42
8.1.110.0000.00717.28
8.1.100.0000.00817.44
8.1.90.0040.00417.32
8.1.80.0000.00817.41
8.1.70.0000.00717.31
8.1.60.0060.00617.52
8.1.50.0050.00217.33
8.1.40.0050.00317.35
8.1.30.0000.00717.59
8.1.20.0040.00417.65
8.1.10.0000.00817.51
8.1.00.0040.00417.39
8.0.300.0050.00318.77
8.0.290.0000.00916.75
8.0.280.0080.00017.88
8.0.270.0030.00318.00
8.0.260.0040.00416.83
8.0.250.0000.00716.96
8.0.240.0050.00316.82
8.0.230.0030.00316.95
8.0.220.0040.00416.77
8.0.210.0030.00516.82
8.0.200.0060.00016.99
8.0.190.0030.00416.97
8.0.180.0070.00016.80
8.0.170.0000.00816.79
8.0.160.0020.00516.85
8.0.150.0000.00716.83
8.0.140.0000.00716.90
8.0.130.0060.00013.35
8.0.120.0040.00416.89
8.0.110.0070.00016.73
8.0.100.0040.00416.75
8.0.90.0070.00016.78
8.0.80.0130.00416.95
8.0.70.0000.00716.77
8.0.60.0000.00716.68
8.0.50.0080.00016.69
8.0.30.0120.01317.09
8.0.20.0130.00917.40
8.0.10.0020.00516.85
8.0.00.0110.00716.67
7.4.330.0000.00616.84
7.4.320.0030.00316.38
7.4.300.0030.00616.26
7.4.290.0030.00316.35
7.4.280.0040.00316.38
7.4.270.0070.00016.36
7.4.260.0050.00013.15
7.4.250.0000.01016.20
7.4.240.0080.00016.37
7.4.230.0020.00516.55
7.4.220.0030.01316.50
7.4.210.0110.00516.34
7.4.200.0020.00516.14
7.4.190.0030.00316.43
7.4.160.0160.00016.59
7.4.150.0130.00417.40
7.4.140.0130.00717.86
7.4.130.0150.00616.42
7.4.120.0100.00716.37
7.4.110.0060.01216.34
7.4.100.0080.00816.41
7.4.90.0160.00716.54
7.4.80.0170.00719.39
7.4.70.0070.01016.28
7.4.60.0090.00616.41
7.4.50.0080.00016.35
7.4.40.0000.00822.77
7.4.30.0120.00616.37
7.4.00.0090.00714.96
7.3.330.0050.00213.15
7.3.320.0000.00513.24
7.3.310.0000.00716.09
7.3.300.0070.00016.15
7.3.290.0030.01016.30
7.3.280.0040.01316.28
7.3.270.0160.00417.40
7.3.260.0090.00818.24
7.3.250.0120.00516.24
7.3.240.0060.00916.28
7.3.230.0030.01316.39
7.3.210.0000.01616.28
7.3.200.0100.01019.39
7.3.190.0130.00316.51
7.3.180.0040.01216.38
7.3.170.0040.01116.46
7.3.160.0100.01116.30
7.3.120.0060.01114.74
7.3.110.0160.00314.73
7.3.100.0090.00914.75
7.3.90.0060.00614.73
7.3.80.0100.00314.61
7.3.70.0110.00414.80
7.3.60.0030.01014.73
7.3.50.0040.00814.39
7.3.40.0100.00314.74
7.3.30.0100.00614.75
7.3.20.0090.00616.46
7.3.10.0030.01016.43
7.3.00.0000.01216.63
7.2.330.0130.00316.31
7.2.320.0060.01616.56
7.2.310.0080.01616.70
7.2.300.0090.00916.71
7.2.290.0060.00916.55
7.2.250.0070.00815.14
7.2.240.0030.01614.66
7.2.230.0060.00614.65
7.2.220.0090.00614.81
7.2.210.0120.00315.06
7.2.200.0040.00715.07
7.2.190.0030.00714.84
7.2.180.0100.00314.86
7.2.170.0070.01014.95
7.2.00.0000.01419.24
7.1.330.0030.01115.63
7.1.320.0060.00915.49
7.1.310.0030.01515.50
7.1.300.0060.00315.39
7.1.290.0060.00615.87
7.1.280.0040.00715.65
7.1.270.0070.00715.64
7.1.260.0030.00615.59
7.1.100.0070.00717.91
7.1.70.0000.01016.73
7.1.60.0070.00317.15
7.1.50.0030.01016.86
7.1.40.0080.00316.44
7.1.30.0080.00516.39
7.1.20.0030.01016.48
7.1.10.0000.01116.62
7.1.00.0040.01116.65
7.0.200.0110.00016.73
7.0.190.0000.01316.35
7.0.180.0080.00416.10
7.0.170.0060.00416.34
7.0.160.0020.00616.26
7.0.150.0050.00516.22
7.0.140.0030.00816.25
7.0.130.0050.00516.56
7.0.120.0090.00416.53
7.0.110.0020.00916.14
7.0.100.0040.01416.36
7.0.90.0050.00516.53
7.0.80.0060.00316.32
7.0.70.0050.00516.14
7.0.60.0040.00716.25
7.0.50.0080.00316.32
7.0.40.0030.00714.87
7.0.30.0040.00814.87
7.0.20.0070.00714.87
7.0.10.0080.00314.87
7.0.00.0000.01414.87
5.6.300.0060.04220.79
5.6.290.0100.04320.67
5.6.280.0030.04321.06
5.6.270.0070.04321.07
5.6.260.0100.04220.79
5.6.250.0070.05720.98
5.6.240.0140.05521.01
5.6.230.0000.05221.04
5.6.220.0100.04220.82
5.6.210.0000.04520.59
5.6.200.0070.04920.82
5.6.190.0160.05520.98
5.6.180.0090.05921.05
5.6.170.0090.04120.92
5.6.160.0030.04721.02
5.6.150.0070.08420.83
5.6.140.0070.04220.92
5.6.130.0070.04221.02
5.6.120.0090.03821.01
5.6.110.0070.04620.72
5.6.100.0090.03720.72
5.6.90.0070.05120.90
5.6.80.0000.04720.21
5.6.70.0000.04820.36
5.6.60.0000.06020.20
5.6.50.0030.04120.41
5.6.40.0240.02820.38
5.6.30.0070.04120.09
5.6.20.0100.04120.33
5.6.10.0100.07020.34
5.6.00.0060.03820.29
5.5.380.0030.04017.46
5.5.370.0060.04217.57
5.5.360.0030.04517.53
5.5.350.0030.04117.46
5.5.340.0030.04417.75
5.5.330.0040.03917.97
5.5.320.0000.04317.98
5.5.310.0030.03917.97
5.5.300.0070.05017.94
5.5.290.0030.04317.82
5.5.280.0030.04117.97
5.5.270.0070.07817.70
5.5.260.0030.04717.93
5.5.250.0060.05017.78
5.5.240.0040.04017.36
5.5.230.0040.06017.34
5.5.220.0000.04317.40
5.5.210.0000.04817.34
5.5.200.0000.05017.44
5.5.190.0030.05317.30
5.5.180.0060.03717.38
5.5.160.0090.03717.09
5.5.150.0070.03817.34
5.5.140.0030.03917.21
5.5.130.0060.03617.05
5.5.120.0100.03617.46
5.5.110.0190.05417.20
5.5.100.0030.03917.12
5.5.90.0030.04117.28
5.5.80.0000.04717.37
5.5.70.0030.04416.98
5.5.60.0000.04517.07
5.5.50.0210.04516.98
5.5.40.0060.03717.18
5.5.30.0100.03316.98
5.5.20.0000.04417.18
5.5.10.0000.05417.28
5.5.00.0000.06417.26
5.4.450.0030.04519.29
5.4.440.0060.04319.37
5.4.430.0100.04219.23
5.4.420.0090.07119.16
5.4.410.0180.03319.30
5.4.400.0040.03918.96
5.4.390.0030.07818.99
5.4.380.0130.03519.04
5.4.370.0070.04019.04
5.4.360.0070.03919.03
5.4.350.0030.04519.10
5.4.340.0100.04318.99
5.4.320.0100.06218.96
5.4.310.0000.05718.91
5.4.300.0030.04218.95
5.4.290.0000.04718.77
5.4.280.0060.03918.86
5.4.270.0100.03218.95
5.4.260.0030.07218.90
5.4.250.0070.07218.93
5.4.240.0060.07119.11
5.4.230.0000.05719.00
5.4.220.0100.03818.95
5.4.210.0070.03419.03
5.4.200.0070.04218.91
5.4.190.0070.03918.83
5.4.180.0060.06118.95
5.4.170.0030.03718.85
5.4.160.0110.03218.77
5.4.150.0030.03818.97
5.4.140.0070.03716.60
5.4.130.0030.04416.46
5.4.120.0030.03416.52
5.4.110.0000.03816.58
5.4.100.0210.03816.62
5.4.90.0290.03216.32
5.4.80.0000.03916.33
5.4.70.0040.03516.55
5.4.60.0070.05616.59
5.4.50.0070.07516.54
5.4.40.0100.06516.53
5.4.30.0030.03716.58
5.4.20.0000.03816.59
5.4.10.0000.04016.37
5.4.00.0070.04815.82
5.3.290.0060.04114.87
5.3.280.0100.03414.87
5.3.270.0030.03714.87
5.3.260.0030.04014.87
5.3.250.0000.06214.87
5.3.240.0030.03814.87
5.3.230.0030.06314.87
5.3.220.0310.03414.87
5.3.210.0030.06114.87
5.3.200.0100.03514.87
5.3.190.0000.04014.87
5.3.180.0030.03714.87
5.3.170.0060.03914.87
5.3.160.0070.03514.87
5.3.150.0030.04814.87
5.3.140.0070.07214.87
5.3.130.0100.04314.87
5.3.120.0070.04114.87
5.3.110.0100.05914.87
5.3.100.0030.03814.87
5.3.90.0000.03814.87
5.3.80.0070.06314.87
5.3.70.0000.04814.87
5.3.60.0070.05314.87
5.3.50.0100.03014.87
5.3.40.0060.03614.87
5.3.30.0030.03514.87
5.3.20.0070.06214.87
5.3.10.0060.03114.87
5.3.00.0070.03014.87
5.2.170.0040.02914.87
5.2.160.0070.06314.87
5.2.150.0030.03314.87
5.2.140.0070.02714.87
5.2.130.0070.02614.87
5.2.120.0000.03714.87
5.2.110.0030.04114.87
5.2.100.0030.04614.87
5.2.90.0000.03414.87
5.2.80.0000.04714.87
5.2.70.0070.04414.87
5.2.60.0030.02914.87
5.2.50.0030.02814.87
5.2.40.0070.02814.87
5.2.30.0070.02714.87
5.2.20.0030.02914.87
5.2.10.0000.04714.87
5.2.00.0000.04114.87
5.1.60.0000.02614.87
5.1.50.0060.01914.87
5.1.40.0000.02814.87
5.1.30.0000.02814.87
5.1.20.0060.02214.87
5.1.10.0030.02814.87
5.1.00.0000.02914.87
5.0.50.0000.02614.87
5.0.40.0000.02114.87
5.0.30.0000.03214.87
5.0.20.0000.02114.87
5.0.10.0000.02114.87
5.0.00.0000.03214.87
4.4.90.0030.01314.87
4.4.80.0030.01314.87
4.4.70.0000.01814.87
4.4.60.0030.01314.87
4.4.50.0030.02714.87
4.4.40.0100.03214.87
4.4.30.0000.02114.87
4.4.20.0030.01414.87
4.4.10.0000.01614.87
4.4.00.0000.02614.87
4.3.110.0000.01714.87
4.3.100.0030.01814.87
4.3.90.0000.01614.87
4.3.80.0000.03114.87
4.3.70.0000.02214.87
4.3.60.0030.01914.87
4.3.50.0000.01914.87
4.3.40.0000.03414.87
4.3.30.0000.02714.87
4.3.20.0000.02214.87
4.3.10.0000.01814.87
4.3.00.0000.02014.87

preferences:
51.07 ms | 401 KiB | 5 Q