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 1): ('1e-1' == '10') = " . ('1e-1' == '10' ? '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 1): ('1E-1' == '10') = " . ('1E-1' == '10' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic 2): ('+1' == '1') = " . ('+1' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic 3): ('+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.40.0120.00618.79
8.3.30.0100.01020.29
8.3.20.0000.00818.73
8.3.10.0080.00020.85
8.3.00.0080.00019.68
8.2.170.0110.00322.96
8.2.160.0150.00020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00021.11
8.2.110.0070.00719.32
8.2.100.0040.00717.91
8.2.90.0000.00819.02
8.2.80.0060.00319.28
8.2.70.0040.00417.62
8.2.60.0000.00817.87
8.2.50.0040.00418.07
8.2.40.0040.00419.95
8.2.30.0000.00719.50
8.2.20.0060.00317.66
8.2.10.0000.00817.66
8.2.00.0050.00317.69
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00820.64
8.1.230.0040.00821.04
8.1.220.0030.00618.77
8.1.210.0060.00318.95
8.1.200.0060.00317.23
8.1.190.0000.00817.41
8.1.180.0080.00018.10
8.1.170.0080.00018.64
8.1.160.0030.00618.71
8.1.150.0040.00418.49
8.1.140.0080.00017.27
8.1.130.0000.00617.68
8.1.120.0000.00717.39
8.1.110.0000.00717.39
8.1.100.0030.00317.46
8.1.90.0070.00017.46
8.1.80.0000.00817.37
8.1.70.0000.00717.38
8.1.60.0000.00817.54
8.1.50.0030.00617.46
8.1.40.0040.00417.36
8.1.30.0000.00817.50
8.1.20.0060.00317.44
8.1.10.0070.00017.45
8.1.00.0000.00717.41
8.0.300.0040.00519.77
8.0.290.0050.00217.18
8.0.280.0070.00018.41
8.0.270.0030.00317.20
8.0.260.0070.00016.79
8.0.250.0070.00016.87
8.0.240.0000.00916.94
8.0.230.0040.00416.87
8.0.220.0000.00716.82
8.0.210.0030.00316.88
8.0.200.0040.00416.88
8.0.190.0050.00216.98
8.0.180.0030.00516.82
8.0.170.0080.00016.90
8.0.160.0040.00416.94
8.0.150.0030.00516.80
8.0.140.0000.00716.92
8.0.130.0070.00013.34
8.0.120.0060.00316.92
8.0.110.0030.00516.95
8.0.100.0000.00716.76
8.0.90.0050.00216.94
8.0.80.0060.01216.79
8.0.70.0000.00716.86
8.0.60.0040.00416.73
8.0.50.0040.00416.83
8.0.30.0120.00716.97
8.0.20.0100.00817.40
8.0.10.0050.00216.76
8.0.00.0130.00616.74
7.4.330.0000.00516.82
7.4.320.0060.00316.47
7.4.300.0000.00716.39
7.4.290.0040.00416.38
7.4.280.0070.00016.48
7.4.270.0030.00316.35
7.4.260.0000.00513.26
7.4.250.0080.00016.37
7.4.240.0000.00716.31
7.4.230.0070.00016.59
7.4.220.0110.01016.48
7.4.210.0050.00916.40
7.4.200.0030.00316.32
7.4.190.0000.00716.53
7.4.160.0120.00416.38
7.4.150.0120.00817.40
7.4.140.0160.00217.86
7.4.130.0070.01316.51
7.4.120.0130.00616.48
7.4.110.0100.01316.36
7.4.100.0070.01616.56
7.4.90.0130.00716.44
7.4.80.0040.02019.39
7.4.70.0060.01216.45
7.4.60.0140.00416.37
7.4.50.0080.00016.43
7.4.40.0030.01222.77
7.4.30.0130.00316.32
7.4.10.0000.01814.86
7.4.00.0090.00814.94
7.3.330.0000.00713.07
7.3.320.0050.00013.12
7.3.310.0040.00416.05
7.3.300.0030.00316.23
7.3.290.0070.00716.31
7.3.280.0100.00416.29
7.3.270.0090.00917.40
7.3.260.0120.01018.24
7.3.250.0120.00516.33
7.3.240.0120.00616.50
7.3.230.0060.01216.39
7.3.210.0140.00716.46
7.3.200.0110.01119.39
7.3.190.0070.01116.58
7.3.180.0100.00716.39
7.3.170.0120.00416.31
7.3.160.0060.00916.26
7.3.130.0040.01415.09
7.3.120.0090.00514.86
7.3.110.0120.00814.72
7.3.100.0120.00314.66
7.3.90.0040.01214.78
7.3.80.0090.00614.63
7.3.70.0000.01714.94
7.3.60.0070.00714.84
7.3.50.0030.00614.85
7.3.40.0030.00614.61
7.3.30.0040.00814.84
7.3.20.0080.00416.32
7.3.10.0090.00616.67
7.3.00.0120.00416.59
7.2.330.0120.00616.59
7.2.320.0140.01016.51
7.2.310.0140.00616.63
7.2.300.0060.00916.38
7.2.290.0040.01316.70
7.2.260.0130.00615.18
7.2.250.0110.00714.82
7.2.240.0090.00614.90
7.2.230.0000.01614.71
7.2.220.0070.00315.15
7.2.210.0080.00414.63
7.2.200.0030.01514.96
7.2.190.0100.00314.85
7.2.180.0130.00014.83
7.2.170.0030.00914.91
7.2.160.0000.01215.20
7.2.150.0030.00817.04
7.2.140.0030.01016.81
7.2.130.0100.01016.82
7.2.120.0130.00716.65
7.2.110.0000.00916.95
7.2.100.0070.01116.66
7.2.90.0050.00816.69
7.2.80.0070.00316.64
7.2.70.0100.01017.05
7.2.60.0060.00916.82
7.2.50.0080.01116.88
7.2.40.0070.00716.84
7.2.30.0040.00816.80
7.2.20.0030.01416.73
7.2.10.0000.01016.65
7.2.00.0090.00718.02
7.1.330.0130.00315.63
7.1.320.0040.01115.41
7.1.310.0100.00316.01
7.1.300.0050.00315.71
7.1.290.0030.00915.68
7.1.280.0040.00415.72
7.1.270.0000.00815.45
7.1.260.0000.00915.92
7.1.250.0000.01715.88
7.1.240.0040.00915.67
7.1.230.0030.01015.64
7.1.220.0040.01115.74
7.1.210.0030.01315.70
7.1.200.0040.00715.58
7.1.190.0030.00915.53
7.1.180.0110.00315.57
7.1.170.0000.00815.84
7.1.160.0070.01015.73
7.1.150.0050.00515.48
7.1.140.0060.00615.73
7.1.130.0060.00615.50
7.1.120.0030.01315.45
7.1.110.0140.00415.78
7.1.100.0070.00916.67
7.1.90.0110.00415.72
7.1.80.0080.00015.59
7.1.70.0060.00616.47
7.1.60.0050.01016.32
7.1.50.0030.01116.08
7.1.40.0110.00516.21
7.1.30.0060.00616.20
7.1.20.0080.00616.29
7.1.10.0080.00416.21
7.1.00.0050.01016.20
7.0.330.0130.00015.34
7.0.320.0030.01015.20
7.0.310.0090.00315.25
7.0.300.0030.00615.31
7.0.290.0030.01015.24
7.0.280.0030.01415.44
7.0.270.0080.00015.22
7.0.260.0110.00715.26
7.0.250.0100.00015.46
7.0.240.0090.00315.35
7.0.230.0140.00015.33
7.0.220.0030.01015.43
7.0.210.0070.00715.30
7.0.200.0030.00916.09
7.0.190.0030.00915.99
7.0.180.0030.00815.95
7.0.170.0030.00916.01
7.0.160.0040.00916.12
7.0.150.0090.00616.11
7.0.140.0030.01215.99
7.0.130.0080.00616.14
7.0.120.0070.00716.05
7.0.110.0040.00715.91
7.0.100.0040.00916.19
7.0.90.0060.00416.13
7.0.80.0080.00516.03
7.0.70.0020.00916.13
7.0.60.0070.00216.18
7.0.50.0030.00715.97
7.0.40.0060.00815.04
7.0.30.0080.00415.02
7.0.20.0060.00815.13
7.0.10.0050.00615.04
7.0.00.0020.01015.22
5.6.400.0060.01314.18
5.6.390.0030.01314.29
5.6.380.0070.01013.85
5.6.370.0060.00614.13
5.6.360.0110.00414.51
5.6.350.0030.01214.55
5.6.340.0100.00713.93
5.6.330.0030.01314.52
5.6.320.0040.01513.93
5.6.310.0090.00614.27
5.6.300.0040.03717.61
5.6.290.0050.02417.36
5.6.280.0070.02117.70
5.6.270.0070.02717.54
5.6.260.0150.03117.81
5.6.250.0000.02817.54
5.6.240.0090.02217.55
5.6.230.0030.02817.48
5.6.220.0070.03017.46
5.6.210.0040.02217.56
5.6.200.0080.02217.56
5.6.190.0060.02917.47
5.6.180.0080.02317.78
5.6.170.0050.04117.47
5.6.160.0050.02717.43
5.6.150.0050.02617.56
5.6.140.0210.02517.80
5.6.130.0050.03117.51
5.6.120.0060.02417.68
5.6.110.0020.03217.50
5.6.100.0090.02117.52
5.6.90.0050.02317.44
5.6.80.0080.02317.12
5.6.70.0060.02417.26
5.6.60.0090.02417.20
5.6.50.0020.02817.35
5.6.40.0020.02517.06
5.6.30.0030.02517.27
5.6.20.0060.02017.38
5.6.10.0070.02317.29
5.6.00.0020.02517.18
5.5.380.0040.02516.01
5.5.370.0050.02715.74
5.5.360.0020.03515.84
5.5.350.0050.02615.86
5.5.340.0030.02816.18
5.5.330.0020.02716.13
5.5.320.0080.02016.05
5.5.310.0050.04315.87
5.5.300.0030.03016.02
5.5.290.0100.02116.17
5.5.280.0020.02616.12
5.5.270.0020.03016.02
5.5.260.0060.02416.09
5.5.250.0050.04516.10
5.5.240.0050.02515.79
5.5.230.0030.03015.88
5.5.220.0030.04515.63
5.5.210.0070.02015.78
5.5.200.0030.02215.84
5.5.190.0020.02315.79
5.5.180.0070.02015.77
5.5.170.0030.01314.02
5.5.160.0020.02715.70
5.5.150.0040.02515.79
5.5.140.0060.02215.73
5.5.130.0080.02115.68
5.5.120.0070.03115.64
5.5.110.0050.04015.57
5.5.100.0040.02115.67
5.5.90.0060.02015.57
5.5.80.0020.02615.77
5.5.70.0030.02515.63
5.5.60.0050.02815.63
5.5.50.0080.02315.85
5.5.40.0020.02615.59
5.5.30.0050.02415.61
5.5.20.0080.02015.69
5.5.10.0040.02315.59
5.5.00.0070.02015.63
5.4.450.0050.02414.96
5.4.440.0000.02615.16
5.4.430.0020.02715.01
5.4.420.0070.02215.06
5.4.410.0020.02514.96
5.4.400.0060.02014.68
5.4.390.0020.02514.79
5.4.380.0020.02214.80
5.4.370.0040.02214.88
5.4.360.0060.02114.91
5.4.350.0000.02314.82
5.4.340.0070.02114.77
5.4.330.0000.01210.91
5.4.320.0050.02814.93
5.4.310.0040.02214.90
5.4.300.0110.01914.78
5.4.290.0050.02814.86
5.4.280.0100.03714.79
5.4.270.0160.01615.01
5.4.260.0050.02114.83
5.4.250.0000.02614.92
5.4.240.0060.01914.96
5.4.230.0080.02214.82
5.4.220.0030.02214.88
5.4.210.0020.02614.83
5.4.200.0030.02514.71
5.4.190.0050.01914.84
5.4.180.0050.02114.79
5.4.170.0030.02414.80
5.4.160.0030.02114.81
5.4.150.0060.01914.61
5.4.140.0070.03613.75
5.4.130.0110.02313.73
5.4.120.0060.02213.74
5.4.110.0050.02113.78
5.4.100.0080.02313.78
5.4.90.0020.02313.70
5.4.80.0060.02013.63
5.4.70.0060.03513.90
5.4.60.0060.03513.70
5.4.50.0080.01813.89
5.4.40.0060.01813.89
5.4.30.0070.01713.84
5.4.20.0070.01913.85
5.4.10.0070.02413.72
5.4.00.0050.02313.76
5.3.290.0040.02313.67
5.3.280.0060.02313.59
5.3.270.0070.02313.61
5.3.260.0030.02713.52
5.3.250.0050.02213.55
5.3.240.0120.02513.55
5.3.230.0070.01713.59
5.3.220.0050.02213.51
5.3.210.0030.02413.50
5.3.200.0000.02313.51
5.3.190.0060.01813.52
5.3.180.0030.02113.51
5.3.170.0040.02313.52
5.3.160.0050.02513.66
5.3.150.0000.03713.65
5.3.140.0110.01713.58
5.3.130.0030.02313.63
5.3.120.0050.02713.51
5.3.110.0000.02813.59
5.3.100.0030.02313.57
5.3.90.0050.02113.63
5.3.80.0050.01813.47
5.3.70.0000.02613.53
5.3.60.0040.01913.58
5.3.50.0020.02813.52
5.3.40.0000.02613.59
5.3.30.0040.02313.54
5.3.20.0030.02013.55
5.3.10.0030.01913.47
5.3.00.0040.02313.47
5.2.170.0130.03816.84
5.2.160.0030.02816.84
5.2.150.0060.02616.84
5.2.140.0030.03116.84
5.2.130.0000.03216.84
5.2.120.0000.03216.84
5.2.110.0000.03316.84
5.2.100.0070.03416.84
5.2.90.0030.02716.84
5.2.80.0060.02716.84
5.2.70.0030.03716.84
5.2.60.0040.02816.84
5.2.50.0030.03016.84
5.2.40.0090.02116.84
5.2.30.0090.06016.84
5.2.20.0000.03116.84
5.2.10.0030.04716.84
5.2.00.0030.03316.84
5.1.60.0000.03516.84
5.1.50.0000.02716.84
5.1.40.0030.03616.84
5.1.30.0030.02916.84
5.1.20.0000.03516.84
5.1.10.0030.02416.84
5.1.00.0030.02416.84
5.0.50.0030.03416.84
5.0.40.0070.04016.84
5.0.30.0000.04416.84
5.0.20.0000.02116.84
5.0.10.0030.02216.84
5.0.00.0030.03016.84
4.4.90.0000.01716.84
4.4.80.0030.01816.84
4.4.70.0030.01416.84
4.4.60.0030.01716.84
4.4.50.0090.01216.84
4.4.40.0000.02516.84
4.4.30.0000.02516.84
4.4.20.0000.02416.84
4.4.10.0070.03116.84
4.4.00.0000.03616.84
4.3.110.0030.03516.84
4.3.100.0000.01816.84
4.3.90.0000.02216.84
4.3.80.0030.03716.84
4.3.70.0000.03816.84
4.3.60.0030.03516.84
4.3.50.0000.01816.84
4.3.40.0030.02316.84
4.3.30.0000.01716.84
4.3.20.0000.01816.84
4.3.10.0040.02216.84
4.3.00.0000.01816.84

preferences:
47.3 ms | 400 KiB | 5 Q