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 (precision1): ('0.99999999999999991' == '1') = " . ('0.99999999999999991' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision2): ('0.99999999999999992' == '1') = " . ('0.99999999999999992' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision3): ('0.99999999999999993' == '1') = " . ('0.99999999999999993' == '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"; echo "Compare two numeric strings (precision6): ('0.99999999999999996' == '1') = " . ('0.99999999999999996' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision7): ('0.99999999999999997' == '1') = " . ('0.99999999999999997' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision8): ('0.99999999999999998' == '1') = " . ('0.99999999999999998' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision9): ('0.99999999999999999' == '1') = " . ('0.99999999999999999' == '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.0120.00318.33
8.3.50.0100.00922.04
8.3.40.0110.00418.76
8.3.30.0030.01220.17
8.3.20.0040.00418.65
8.3.10.0030.00621.05
8.3.00.0060.00319.54
8.2.180.0220.00016.63
8.2.170.0070.00722.96
8.2.160.0100.00320.39
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0070.00021.04
8.2.110.0110.00020.55
8.2.100.0060.00617.72
8.2.90.0070.00019.08
8.2.80.0050.00219.38
8.2.70.0090.00017.50
8.2.60.0040.00417.80
8.2.50.0070.00318.07
8.2.40.0040.00419.88
8.2.30.0000.00719.51
8.2.20.0000.00817.74
8.2.10.0080.00017.71
8.2.00.0080.00017.77
8.1.280.0080.01225.92
8.1.270.0040.00423.99
8.1.260.0140.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00620.77
8.1.230.0080.00320.93
8.1.220.0030.00518.77
8.1.210.0050.00519.04
8.1.200.0050.00517.35
8.1.190.0030.00517.50
8.1.180.0000.00818.10
8.1.170.0000.00818.64
8.1.160.0000.00718.75
8.1.150.0000.00718.60
8.1.140.0040.00417.44
8.1.130.0000.00817.78
8.1.120.0000.00817.39
8.1.110.0040.00417.39
8.1.100.0050.00217.41
8.1.90.0050.00217.24
8.1.80.0040.00417.43
8.1.70.0000.00717.39
8.1.60.0000.01217.55
8.1.50.0070.00017.43
8.1.40.0060.00317.36
8.1.30.0040.00417.59
8.1.20.0040.00417.61
8.1.10.0020.00517.49
8.1.00.0040.00417.26
8.0.300.0070.00019.76
8.0.290.0070.00317.05
8.0.280.0030.00318.39
8.0.270.0070.00017.20
8.0.260.0000.00816.82
8.0.250.0000.00716.95
8.0.240.0050.00316.93
8.0.230.0030.00316.86
8.0.220.0070.00016.88
8.0.210.0030.00516.86
8.0.200.0000.00616.86
8.0.190.0000.00816.86
8.0.180.0060.00316.89
8.0.170.0040.00416.85
8.0.160.0070.00016.88
8.0.150.0000.00716.88
8.0.140.0040.00416.82
8.0.130.0060.00313.34
8.0.120.0040.00416.91
8.0.110.0080.00016.90
8.0.100.0030.00516.80
8.0.90.0000.00716.79
8.0.80.0000.01616.82
8.0.70.0000.00717.02
8.0.60.0040.00416.84
8.0.50.0000.00716.91
8.0.30.0040.01516.85
8.0.20.0150.00617.40
8.0.10.0040.00417.03
8.0.00.0080.01316.72
7.4.330.0000.00616.67
7.4.320.0040.00416.40
7.4.300.0070.00016.49
7.4.290.0050.00316.38
7.4.280.0030.00316.47
7.4.270.0050.00316.40
7.4.260.0000.00513.15
7.4.250.0000.00816.26
7.4.240.0000.00716.39
7.4.230.0070.00016.43
7.4.220.0060.01016.36
7.4.210.0060.00916.42
7.4.200.0000.00716.47
7.4.190.0050.00216.30
7.4.160.0050.01416.47
7.4.150.0090.01517.40
7.4.140.0160.00317.86
7.4.130.0110.00516.56
7.4.120.0050.01316.41
7.4.110.0000.01716.43
7.4.100.0100.00716.50
7.4.90.0150.00916.45
7.4.80.0120.00919.39
7.4.70.0100.00516.21
7.4.60.0080.00816.33
7.4.50.0030.00616.30
7.4.40.0060.01022.77
7.4.30.0160.00716.35
7.4.00.0070.00914.96
7.3.330.0040.00413.08
7.3.320.0000.00513.12
7.3.310.0000.00716.25
7.3.300.0030.00316.25
7.3.290.0040.01116.23
7.3.280.0090.00816.24
7.3.270.0110.00617.40
7.3.260.0090.00918.24
7.3.250.0090.00716.25
7.3.240.0130.00416.51
7.3.230.0070.01116.39
7.3.210.0190.00316.30
7.3.200.0140.00316.24
7.3.190.0060.00916.25
7.3.180.0030.01316.48
7.3.170.0080.00816.31
7.3.160.0170.00316.10
7.3.120.0030.01514.86
7.3.110.0100.00714.86
7.3.100.0070.01114.41
7.3.90.0140.00314.66
7.3.80.0130.00014.77
7.3.70.0030.00914.72
7.3.60.0070.01114.68
7.3.50.0110.00014.84
7.3.40.0070.00714.89
7.3.30.0060.00614.94
7.3.20.0060.00616.38
7.3.10.0110.00616.59
7.3.00.0130.00316.70
7.2.330.0100.01016.64
7.2.320.0040.01216.67
7.2.310.0110.00716.64
7.2.300.0110.00616.54
7.2.290.0120.00616.35
7.2.250.0090.01214.71
7.2.240.0130.01014.82
7.2.230.0000.01415.02
7.2.220.0090.00614.95
7.2.210.0070.01015.19
7.2.200.0030.01114.96
7.2.190.0100.00314.88
7.2.180.0090.00615.05
7.2.170.0100.00315.04
7.2.160.0060.00615.07
7.2.150.0040.01216.98
7.2.140.0080.00416.88
7.2.130.0090.00916.66
7.2.120.0030.00916.70
7.2.110.0030.01016.81
7.2.100.0130.00316.83
7.2.90.0110.00316.93
7.2.80.0030.01016.83
7.2.70.0030.01016.86
7.2.60.0130.00316.80
7.2.50.0000.01517.08
7.2.40.0040.00816.52
7.2.30.0050.00516.83
7.2.20.0060.00617.05
7.2.10.0040.01216.80
7.2.00.0060.00618.08
7.1.330.0140.00715.87
7.1.320.0000.01415.36
7.1.310.0000.01115.82
7.1.300.0110.00415.68
7.1.290.0040.01115.76
7.1.280.0050.00515.54
7.1.270.0130.00315.66
7.1.260.0060.01215.38
7.1.250.0030.01015.62
7.1.240.0060.00615.74
7.1.230.0000.01515.51
7.1.220.0000.01415.78
7.1.210.0070.00715.37
7.1.200.0110.00415.76
7.1.190.0060.00915.57
7.1.180.0000.01415.49
7.1.170.0080.00315.55
7.1.160.0100.00715.78
7.1.150.0030.00915.84
7.1.140.0030.01015.89
7.1.130.0030.01215.88
7.1.120.0070.01015.86
7.1.110.0070.00715.61
7.1.100.0000.01416.76
7.1.90.0070.01015.72
7.1.80.0080.00615.36
7.1.70.0020.01116.14
7.1.60.0050.00716.49
7.1.50.0090.00716.22
7.1.40.0030.01015.35
7.1.30.0040.01115.61
7.1.20.0040.01115.43
7.1.10.0080.00415.42
7.1.00.0020.03019.07
7.0.330.0040.01115.05
7.0.320.0030.00615.29
7.0.310.0030.00715.32
7.0.300.0040.01115.35
7.0.290.0030.00915.30
7.0.280.0000.00715.23
7.0.270.0080.00815.11
7.0.260.0040.00815.23
7.0.250.0030.01015.18
7.0.240.0030.01015.49
7.0.230.0090.00315.07
7.0.220.0000.01515.45
7.0.210.0070.01015.38
7.0.200.0090.00516.03
7.0.190.0090.00615.36
7.0.180.0030.00915.33
7.0.170.0070.00715.38
7.0.160.0060.00615.36
7.0.150.0040.01115.16
7.0.140.0050.04018.71
7.0.130.0070.00715.36
7.0.120.0070.01015.42
7.0.110.0030.02517.72
7.0.100.0090.03317.56
7.0.90.0060.04417.70
7.0.80.0050.04817.65
7.0.70.0110.04117.55
7.0.60.0070.03917.67
7.0.50.0110.03717.81
7.0.40.0090.04016.61
7.0.30.0080.04316.50
7.0.20.0050.04716.51
7.0.10.0070.04416.63
7.0.00.0030.02916.47
5.6.400.0060.00914.39
5.6.390.0030.00913.77
5.6.380.0060.00314.35
5.6.370.0000.01714.64
5.6.360.0030.01014.53
5.6.350.0040.00914.40
5.6.340.0060.00314.60
5.6.330.0050.01014.51
5.6.320.0030.00614.08
5.6.310.0030.01014.53
5.6.300.0040.00814.43
5.6.290.0100.00714.59
5.6.280.0090.03517.77
5.6.270.0000.01414.34
5.6.260.0030.04817.37
5.6.250.0050.02217.37
5.6.240.0050.04317.38
5.6.230.0060.04817.49
5.6.220.0070.04217.53
5.6.210.0060.04117.54
5.6.200.0000.05117.60
5.6.190.0100.04017.44
5.6.180.0030.04517.43
5.6.170.0050.04817.55
5.6.160.0100.03017.48
5.6.150.0050.03217.38
5.6.140.0020.04717.51
5.6.130.0040.04517.42
5.6.120.0030.03817.41
5.6.110.0120.04017.32
5.6.100.0060.04517.36
5.6.90.0070.04417.42
5.6.80.0050.04517.24
5.6.70.0080.04017.10
5.6.60.0080.03817.02
5.6.50.0030.04617.11
5.6.40.0070.03817.02
5.6.30.0080.04216.97
5.6.20.0070.03517.13
5.6.10.0050.03616.98
5.6.00.0050.04416.99
5.5.380.0090.02315.95
5.5.370.0080.03315.86
5.5.360.0050.04415.88
5.5.350.0050.03715.68
5.5.340.0060.04316.07
5.5.330.0060.04216.12
5.5.320.0090.04216.28
5.5.310.0070.04216.04
5.5.300.0050.04716.19
5.5.290.0050.04216.04
5.5.280.0110.03616.15
5.5.270.0080.04316.23
5.5.260.0100.04216.31
5.5.250.0090.04016.06
5.5.240.0050.03515.68
5.5.230.0030.03515.89
5.5.220.0080.04115.78
5.5.210.0060.04015.81
5.5.200.0070.04015.75
5.5.190.0100.03815.66
5.5.180.0050.04215.86
5.5.170.0110.00014.39
5.5.160.0080.04315.51
5.5.150.0050.04015.74
5.5.140.0070.03515.66
5.5.130.0020.02515.89
5.5.120.0050.02415.75
5.5.110.0040.02315.76
5.5.100.0040.02115.66
5.5.90.0100.02715.57
5.5.80.0060.02215.83
5.5.70.0000.02815.80
5.5.60.0030.02215.83
5.5.50.0080.01715.61
5.5.40.0050.02915.66
5.5.30.0060.02015.59
5.5.20.0020.02715.58
5.5.10.0080.02015.62
5.5.00.0010.02615.82
5.4.450.0070.04015.10
5.4.440.0070.04215.18
5.4.430.0120.02015.20
5.4.420.0070.03015.11
5.4.410.0030.04315.02
5.4.400.0050.03514.98
5.4.390.0050.04014.92
5.4.380.0020.04514.91
5.4.370.0050.04114.94
5.4.360.0030.04315.08
5.4.350.0070.02815.00
5.4.340.0150.03515.03
5.4.330.0030.00610.89
5.4.320.0050.04214.91
5.4.310.0120.03815.00
5.4.300.0030.02315.03
5.4.290.0030.02815.07
5.4.280.0020.02815.01
5.4.270.0040.02314.95
5.4.260.0030.02415.09
5.4.250.0020.02514.91
5.4.240.0030.02514.94
5.4.230.0060.02015.03
5.4.220.0040.02014.93
5.4.210.0070.01714.99
5.4.200.0000.02415.03
5.4.190.0080.03014.96
5.4.180.0080.01815.00
5.4.170.0070.03414.96
5.4.160.0050.03214.90
5.4.150.0050.02214.99
5.4.140.0030.04113.56
5.4.130.0000.02813.65
5.4.120.0010.02313.53
5.4.110.0020.02413.69
5.4.100.0050.02013.71
5.4.90.0050.02513.64
5.4.80.0030.02413.63
5.4.70.0000.02413.58
5.4.60.0020.02213.70
5.4.50.0020.01813.63
5.4.40.0030.02213.71
5.4.30.0040.02213.70
5.4.20.0090.03513.63
5.4.10.0050.03413.65
5.4.00.0020.02013.27
5.3.290.0120.03112.79
5.3.280.0040.02212.72
5.3.270.0050.02012.76
5.3.260.0050.03812.72
5.3.250.0060.02112.76
5.3.240.0080.02312.69
5.3.230.0030.03412.75
5.3.220.0050.01812.67
5.3.210.0010.02312.77
5.3.200.0020.02712.73
5.3.190.0050.02012.77
5.3.180.0030.01812.77
5.3.170.0050.02012.74
5.3.160.0020.03312.77
5.3.150.0040.02212.78
5.3.140.0050.02512.68
5.3.130.0020.02212.73
5.3.120.0030.02912.76
5.3.110.0010.02412.77
5.3.100.0020.02412.50
5.3.90.0020.02812.38
5.3.80.0050.03312.51
5.3.70.0000.02412.42
5.3.60.0020.02112.38
5.3.50.0070.01812.32
5.3.40.0090.03212.33
5.3.30.0030.03012.35
5.3.20.0050.04112.33
5.3.10.0080.03612.24
5.3.00.0030.03512.24
5.2.170.0030.06711.31
5.2.160.0030.02311.31
5.2.150.0000.04711.31
5.2.140.0000.03011.31
5.2.130.0030.04711.31
5.2.120.0130.05711.31
5.2.110.0070.06011.31
5.2.100.0030.06011.31
5.2.90.0000.06311.31
5.2.80.0100.05311.31
5.2.70.0030.06311.31
5.2.60.0100.05311.31
5.2.50.0130.05011.31
5.2.40.0100.05711.31
5.2.30.0030.06311.31
5.2.20.0070.06011.31
5.2.10.0070.05711.31
5.2.00.0030.06011.31
5.1.60.0070.05311.31
5.1.50.0000.06011.31
5.1.40.0030.05311.31
5.1.30.0130.04711.31
5.1.20.0070.05311.31
5.1.10.0100.05311.31
5.1.00.0030.05711.31
5.0.50.0030.04011.31
5.0.40.0070.04011.31
5.0.30.0100.05311.31
5.0.20.0030.03311.31
5.0.10.0030.04311.31
5.0.00.0070.06011.31
4.4.90.0030.03711.31
4.4.80.0070.03011.31
4.4.70.0030.03311.31
4.4.60.0000.03711.31
4.4.50.0030.03311.31
4.4.40.0000.03711.31
4.4.30.0030.03311.31
4.4.20.0000.03711.31
4.4.10.0000.03711.31
4.4.00.0000.05711.31
4.3.110.0070.03311.31
4.3.100.0070.03011.31
4.3.90.0070.03011.31
4.3.80.0070.05011.31
4.3.70.0030.03311.31
4.3.60.0000.03311.31
4.3.50.0070.01711.31
4.3.40.0030.04011.31
4.3.30.0030.03011.31
4.3.20.0030.03711.31
4.3.10.0000.03711.31
4.3.00.0000.03711.31

preferences:
38.86 ms | 401 KiB | 5 Q