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"; echo "Compare two numeric strings (+/-0): ('+0' == '-0') = " . ('+0' == '-0' ? '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.0200.00018.56
8.3.50.0090.00622.05
8.3.40.0040.01118.61
8.3.30.0040.01120.30
8.3.20.0080.00018.90
8.3.10.0050.00321.09
8.3.00.0030.00619.56
8.2.180.0110.01116.50
8.2.170.0120.00622.96
8.2.160.0130.00320.33
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00421.06
8.2.110.0040.00720.52
8.2.100.0030.00917.72
8.2.90.0050.00319.05
8.2.80.0040.00419.36
8.2.70.0000.00917.50
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0030.00519.95
8.2.30.0070.00019.33
8.2.20.0080.00017.59
8.2.10.0040.00417.76
8.2.00.0000.00717.69
8.1.280.0030.01225.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.53
8.1.230.0070.00320.87
8.1.220.0050.00318.77
8.1.210.0040.00418.96
8.1.200.0060.00317.35
8.1.190.0030.00517.39
8.1.180.0080.00018.10
8.1.170.0000.00818.50
8.1.160.0040.00418.70
8.1.150.0040.00418.59
8.1.140.0000.00717.43
8.1.130.0030.00317.74
8.1.120.0000.00717.42
8.1.110.0000.00717.28
8.1.100.0000.00717.45
8.1.90.0030.00317.39
8.1.80.0040.00317.29
8.1.70.0040.00417.32
8.1.60.0040.00417.55
8.1.50.0080.00017.36
8.1.40.0030.00517.45
8.1.30.0000.00917.57
8.1.20.0080.00017.48
8.1.10.0040.00417.49
8.1.00.0040.00417.29
8.0.300.0050.00519.75
8.0.290.0030.00317.05
8.0.280.0030.00318.40
8.0.270.0030.00317.13
8.0.260.0030.00316.83
8.0.250.0080.00016.98
8.0.240.0040.00416.98
8.0.230.0070.00017.00
8.0.220.0030.00316.78
8.0.210.0070.00016.93
8.0.200.0000.00717.03
8.0.190.0030.00417.01
8.0.180.0040.00416.97
8.0.170.0000.00816.85
8.0.160.0070.00016.82
8.0.150.0000.00716.76
8.0.140.0030.00316.71
8.0.130.0060.00313.26
8.0.120.0050.00316.79
8.0.110.0060.00316.77
8.0.100.0050.00216.77
8.0.90.0040.00416.88
8.0.80.0090.00916.85
8.0.70.0040.00316.74
8.0.60.0040.00416.75
8.0.50.0040.00416.72
8.0.30.0130.00517.15
8.0.20.0120.00917.40
8.0.10.0000.00816.98
8.0.00.0100.01016.70
7.4.330.0000.00616.66
7.4.320.0000.00916.51
7.4.300.0030.00316.29
7.4.290.0000.00716.46
7.4.280.0070.00016.40
7.4.270.0000.00616.34
7.4.260.0030.00313.27
7.4.250.0000.00716.46
7.4.240.0070.00016.41
7.4.230.0030.00316.49
7.4.220.0040.01816.43
7.4.210.0110.00416.45
7.4.200.0000.00716.60
7.4.190.0000.00716.25
7.4.160.0120.01216.39
7.4.150.0080.00917.40
7.4.140.0140.00517.86
7.4.130.0090.00916.50
7.4.120.0090.01116.38
7.4.110.0190.00316.30
7.4.100.0100.00716.46
7.4.90.0130.00916.29
7.4.80.0150.01219.39
7.4.70.0040.01216.36
7.4.60.0100.00716.44
7.4.50.0030.00616.34
7.4.40.0120.00622.77
7.4.30.0060.01616.43
7.4.00.0070.01115.02
7.3.330.0000.00613.16
7.3.320.0030.00313.10
7.3.310.0030.00316.34
7.3.300.0070.00016.18
7.3.290.0070.00716.29
7.3.280.0080.00816.27
7.3.270.0100.00717.40
7.3.260.0090.00918.24
7.3.250.0050.01216.33
7.3.240.0070.01016.45
7.3.230.0130.00316.39
7.3.210.0120.00616.56
7.3.200.0130.00719.39
7.3.190.0070.01016.21
7.3.180.0130.00316.21
7.3.170.0040.01116.27
7.3.160.0030.01216.30
7.3.120.0050.01114.84
7.3.110.0090.00614.80
7.3.100.0040.01415.09
7.3.90.0060.00614.76
7.3.80.0100.00314.94
7.3.70.0030.01114.76
7.3.60.0090.00614.55
7.3.50.0040.00814.75
7.3.40.0060.01014.56
7.3.30.0030.01014.79
7.3.20.0100.00316.62
7.3.10.0020.01116.58
7.3.00.0050.00516.70
7.2.330.0170.00016.82
7.2.320.0070.01116.71
7.2.310.0060.01216.60
7.2.300.0180.00016.61
7.2.290.0090.00616.70
7.2.250.0030.01615.14
7.2.240.0060.01215.15
7.2.230.0000.01715.14
7.2.220.0070.00714.84
7.2.210.0070.00714.66
7.2.200.0080.00414.96
7.2.190.0100.00714.98
7.2.180.0070.00714.98
7.2.170.0060.00614.93
7.2.130.0090.00616.63
7.2.120.0120.00216.58
7.2.110.0020.01316.51
7.2.100.0060.00916.63
7.2.90.0080.00816.60
7.2.80.0090.00516.70
7.2.70.0060.00716.85
7.2.60.0050.00916.69
7.2.50.0110.00516.59
7.2.40.0120.00516.67
7.2.30.0110.00216.63
7.2.20.0060.01016.72
7.2.10.0090.00316.63
7.2.00.0030.00917.70
7.1.330.0000.01615.73
7.1.320.0070.00715.73
7.1.310.0080.00615.44
7.1.300.0040.01215.66
7.1.290.0040.00815.80
7.1.280.0030.01215.39
7.1.270.0040.01215.48
7.1.260.0070.00715.66
7.1.250.0100.00315.61
7.1.240.0030.00815.66
7.1.230.0110.00415.55
7.1.220.0070.01015.70
7.1.210.0060.00915.65
7.1.200.0100.00315.52
7.1.190.0110.00315.73
7.1.180.0740.00315.51
7.1.170.0060.00615.39
7.1.160.0130.00015.51
7.1.150.0110.00415.65
7.1.140.0100.00215.66
7.1.130.0070.01315.77
7.1.120.0060.00915.60
7.1.110.0070.00715.48
7.1.100.0050.01016.79
7.1.90.0060.01015.86
7.1.80.0090.00315.73
7.1.70.0090.00516.50
7.1.60.0080.00716.55
7.1.50.0070.00716.69
7.1.40.0060.00816.79
7.1.30.0060.00616.76
7.1.20.0070.00716.70
7.1.10.0080.00616.60
7.1.00.0020.01416.61
7.0.320.0130.00315.07
7.0.310.0080.00815.27
7.0.300.0050.00815.38
7.0.290.0090.00615.37
7.0.280.0090.00315.20
7.0.270.0130.00315.14
7.0.260.0080.00815.34
7.0.250.0090.00615.30
7.0.240.0100.00315.44
7.0.230.0130.00015.42
7.0.220.0110.00315.49
7.0.210.0120.00015.28
7.0.200.0090.00816.54
7.0.190.0090.00316.48
7.0.180.0080.00816.48
7.0.170.0100.00716.34
7.0.160.0070.00916.57
7.0.150.0100.00416.50
7.0.140.0370.00716.59
7.0.130.0020.01116.49
7.0.120.0040.01016.47
7.0.110.0100.00416.37
7.0.100.0060.00716.50
7.0.90.0020.00916.41
7.0.80.0120.00016.41
7.0.70.0060.01116.47
7.0.60.0070.00716.50
7.0.50.0100.00316.53
7.0.40.0080.00715.49
7.0.30.0030.01015.41
7.0.20.0080.00315.52
7.0.10.0090.00415.46
7.0.00.0040.00715.45
5.6.380.0140.00014.01
5.6.370.0100.00014.08
5.6.360.0080.00814.00
5.6.350.0090.00314.49
5.6.340.0110.00314.62
5.6.330.0000.01314.64
5.6.320.0080.00814.46
5.6.310.0130.00414.51
5.6.300.0050.02517.40
5.6.290.0040.03117.75
5.6.280.0070.02417.73
5.6.270.0060.02717.64
5.6.260.0070.02617.72
5.6.250.0070.02317.79
5.6.240.0090.03117.53
5.6.230.0070.03017.64
5.6.220.0100.04117.60
5.6.210.0020.03117.41
5.6.200.0040.02517.53
5.6.190.0080.02417.56
5.6.180.0120.03217.64
5.6.170.0120.02117.61
5.6.160.0110.02117.60
5.6.150.0110.03017.77
5.6.140.0050.04017.69
5.6.130.0050.02917.56
5.6.120.0110.02017.45
5.6.110.0070.03817.56
5.6.100.0060.02717.58
5.6.90.0080.04617.57
5.6.80.0060.02817.23
5.6.70.0050.03517.19
5.6.60.0040.04617.42
5.6.50.0050.02617.14
5.6.40.0090.02117.05
5.6.30.0130.02017.21
5.6.20.0090.02617.21
5.6.10.0090.02317.22
5.6.00.0090.02517.14
5.5.380.0050.02414.31
5.5.370.0080.04114.28
5.5.360.0050.02714.31
5.5.350.0020.02814.18
5.5.340.0050.02214.70
5.5.330.0060.02414.47
5.5.320.0050.02514.40
5.5.310.0070.02114.47
5.5.300.0050.02514.44
5.5.290.0050.02414.51
5.5.280.0050.02514.50
5.5.270.0140.02314.61
5.5.260.0080.02114.55
5.5.250.0070.02214.36
5.5.240.0060.02714.27
5.5.230.0070.03414.16
5.5.220.0050.03214.16
5.5.210.0020.02814.21
5.5.200.0080.01914.34
5.5.190.0090.01914.33
5.5.180.0080.02514.35
5.5.170.0080.00813.89
5.5.160.0050.02214.33
5.5.150.0030.02214.27
5.5.140.0050.02814.29
5.5.130.0120.02914.38
5.5.120.0060.02314.38
5.5.110.0040.02414.22
5.5.100.0070.02314.31
5.5.90.0070.02114.21
5.5.80.0050.02214.26
5.5.70.0090.01914.37
5.5.60.0080.02214.24
5.5.50.0060.04014.33
5.5.40.0070.04714.25
5.5.30.0040.02314.35
5.5.20.0020.02714.34
5.5.10.0020.02314.19
5.5.00.0050.02914.34
5.4.450.0070.02315.20
5.4.440.0050.03215.03
5.4.430.0030.02414.95
5.4.420.0050.02315.12
5.4.410.0090.02414.98
5.4.400.0090.01814.92
5.4.390.0090.01914.90
5.4.380.0040.04214.74
5.4.370.0050.02714.97
5.4.360.0060.04415.01
5.4.350.0080.03214.74
5.4.340.0040.03014.96
5.4.330.0090.00411.13
5.4.320.0060.02114.98
5.4.310.0080.03114.90
5.4.300.0110.02115.00
5.4.290.0050.04414.89
5.4.280.0040.04514.75
5.4.270.0080.02114.91
5.4.260.0070.03915.03
5.4.250.0070.02514.83
5.4.240.0050.02814.95
5.4.230.0080.03814.80
5.4.220.0100.03714.95
5.4.210.0070.02614.76
5.4.200.0060.04115.09
5.4.190.0080.02114.97
5.4.180.0030.02414.87
5.4.170.0060.02214.99
5.4.160.0050.02214.96
5.4.150.0090.04014.98
5.4.140.0050.03814.25
5.4.130.0040.02214.22
5.4.120.0020.04314.29
5.4.110.0050.02314.23
5.4.100.0100.02414.08
5.4.90.0040.03814.36
5.4.80.0060.02014.27
5.4.70.0030.03014.14
5.4.60.0060.02214.28
5.4.50.0030.02214.29
5.4.40.0040.02214.28
5.4.30.0000.02514.31
5.4.20.0120.02214.21
5.4.10.0040.02114.14
5.4.00.0060.02114.27
5.3.290.0080.04114.04
5.3.280.0030.02113.98
5.3.270.0040.02514.01
5.3.260.0020.04713.98
5.3.250.0080.01814.00
5.3.240.0040.02213.98
5.3.230.0090.04013.98
5.3.220.0050.02313.98
5.3.210.0030.02313.98
5.3.200.0060.02013.98
5.3.190.0050.03214.00
5.3.180.0060.03213.98
5.3.170.0020.04013.98
5.3.160.0040.02213.98
5.3.150.0110.01813.98
5.3.140.0040.02013.98
5.3.130.0070.02413.98
5.3.120.0070.02213.98
5.3.110.0060.02713.98
5.3.100.0110.01713.98
5.3.90.0080.02014.05
5.3.80.0060.02213.98
5.3.70.0060.02013.98
5.3.60.0060.03013.98
5.3.50.0040.02113.98
5.3.40.0100.01813.98
5.3.30.0080.01913.98
5.3.20.0060.02013.98
5.3.10.0030.02113.98
5.3.00.0020.02313.98
5.2.170.0000.01913.98
5.2.160.0060.02013.98
5.2.150.0040.01813.98
5.2.140.0040.03213.98
5.2.130.0050.01713.98
5.2.120.0020.02013.98
5.2.110.0050.01713.98
5.2.100.0040.02013.98
5.2.90.0030.02113.98
5.2.80.0030.01813.98
5.2.70.0040.02113.98
5.2.60.0090.01913.98
5.2.50.0060.02113.98
5.2.40.0020.02013.98
5.2.30.0070.01713.98
5.2.20.0040.01713.98
5.2.10.0050.01813.98
5.2.00.0070.02013.98
5.1.60.0000.01813.98
5.1.50.0060.01313.98
5.1.40.0040.01413.98
5.1.30.0030.01613.98
5.1.20.0080.01913.98
5.1.10.0050.02013.98
5.1.00.0080.01113.98
5.0.50.0130.01113.98
5.0.40.0020.01313.98
5.0.30.0030.01713.98
5.0.20.0050.02313.98
5.0.10.0070.01313.98
5.0.00.0060.02713.98
4.4.90.0030.00813.98
4.4.80.0040.00713.98
4.4.70.0050.01013.98
4.4.60.0060.00713.98
4.4.50.0040.00813.98
4.4.40.0010.01413.98
4.4.30.0050.00913.98
4.4.20.0030.02013.98
4.4.10.0040.01013.98
4.4.00.0040.01413.98
4.3.110.0030.01113.98
4.3.100.0030.01413.98
4.3.90.0040.00913.98
4.3.80.0060.01513.98
4.3.70.0040.00813.98
4.3.60.0040.00813.98
4.3.50.0050.00813.98
4.3.40.0000.01813.98
4.3.30.0030.00913.98
4.3.20.0030.01113.98
4.3.10.0000.01213.98
4.3.00.0030.00913.98

preferences:
54.24 ms | 400 KiB | 5 Q