3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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.40.0110.00418.54
8.3.30.0000.01419.09
8.3.20.0080.00020.38
8.3.10.0000.00723.52
8.3.00.0040.00417.89
8.2.170.0140.00022.96
8.2.160.0030.01020.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.83
8.2.110.0030.00621.90
8.2.100.0080.00418.03
8.2.90.0000.00819.04
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0050.00317.90
8.2.50.0090.00018.07
8.2.40.0030.00619.94
8.2.30.0050.00318.07
8.2.20.0030.00617.67
8.2.10.0070.00017.90
8.2.00.0000.00817.75
8.1.270.0040.00423.87
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0030.00723.88
8.1.230.0080.00418.97
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00617.10
8.1.190.0030.00617.00
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0040.00421.93
8.1.150.0070.00018.69
8.1.140.0040.00417.44
8.1.130.0030.00317.75
8.1.120.0030.00517.43
8.1.110.0030.00517.38
8.1.100.0070.00017.29
8.1.90.0040.00417.41
8.1.80.0000.00717.42
8.1.70.0070.00017.37
8.1.60.0090.00017.45
8.1.50.0050.00317.35
8.1.40.0000.00717.30
8.1.30.0060.00317.46
8.1.20.0080.00017.57
8.1.10.0040.00417.45
8.1.00.0040.00417.32
8.0.300.0050.00318.77
8.0.290.0000.00716.63
8.0.280.0000.00718.31
8.0.270.0000.00717.20
8.0.260.0050.00317.11
8.0.250.0070.00016.99
8.0.240.0000.00716.96
8.0.230.0000.00717.00
8.0.220.0070.00016.77
8.0.210.0030.00316.89
8.0.200.0070.00316.91
8.0.190.0040.00416.89
8.0.180.0050.00316.82
8.0.170.0040.00416.82
8.0.160.0030.00416.76
8.0.150.0030.00316.77
8.0.140.0030.00316.87
8.0.130.0000.00613.35
8.0.120.0040.00416.75
8.0.110.0050.00216.81
8.0.100.0040.00416.73
8.0.90.0000.00716.76
8.0.80.0040.01116.86
8.0.70.0030.00516.88
8.0.60.0040.00416.85
8.0.50.0070.00016.86
8.0.30.0130.00516.87
8.0.20.0060.01417.40
8.0.10.0000.00716.95
8.0.00.0130.00816.58
7.4.330.0000.00515.00
7.4.320.0030.00316.38
7.4.300.0030.00316.55
7.4.290.0070.00016.44
7.4.280.0040.00416.32
7.4.270.0000.00716.39
7.4.260.0000.00716.36
7.4.250.0050.00216.29
7.4.240.0000.00716.40
7.4.230.0000.00716.26
7.4.220.0070.01016.39
7.4.210.0070.00716.49
7.4.200.0030.00316.27
7.4.160.0070.01016.30
7.4.150.0110.01117.40
7.4.140.0050.01217.86
7.4.130.0110.00616.48
7.4.120.0080.00916.35
7.4.110.0090.00916.28
7.4.100.0030.01316.24
7.4.90.0070.01016.40
7.4.80.0100.01019.39
7.4.70.0080.00816.53
7.4.60.0110.00616.43
7.4.50.0040.00016.06
7.4.40.0030.01316.23
7.4.30.0060.00916.58
7.4.10.0120.00314.82
7.4.00.0070.00914.97
7.3.330.0000.00513.02
7.3.320.0060.00012.99
7.3.310.0000.00816.13
7.3.300.0030.00316.27
7.3.290.0000.01416.30
7.3.280.0100.00916.27
7.3.270.0030.01517.40
7.3.260.0110.00716.28
7.3.250.0120.01216.46
7.3.240.0090.01516.56
7.3.230.0040.01316.39
7.3.210.0150.00416.29
7.3.200.0070.01016.28
7.3.190.0110.00716.49
7.3.180.0030.01216.48
7.3.170.0120.00316.47
7.3.160.0170.00016.14
7.3.130.0110.00714.95
7.3.120.0080.00814.91
7.3.110.0100.00714.75
7.3.100.0020.01314.77
7.3.90.0050.01014.70
7.3.80.0040.01114.60
7.3.70.0030.00914.64
7.3.60.0060.01114.72
7.3.50.0080.00514.87
7.3.40.0080.00514.60
7.3.30.0090.00214.82
7.3.20.0030.01016.59
7.3.10.0060.00716.55
7.3.00.0080.00516.60
7.2.330.0100.01016.62
7.2.320.0060.01016.33
7.2.310.0130.01016.46
7.2.300.0040.01316.50
7.2.290.0080.00916.62
7.2.260.0000.01515.20
7.2.250.0110.00615.22
7.2.240.0070.01014.93
7.2.230.0100.00514.89
7.2.220.0040.01114.91
7.2.210.0060.00814.79
7.2.200.0080.00415.05
7.2.190.0050.01114.78
7.2.180.0080.00514.85
7.2.170.0040.00714.85
7.2.160.0080.00514.92
7.2.150.0070.01116.70
7.2.140.0120.00316.89
7.2.130.0100.00616.89
7.2.120.0070.00916.82
7.2.110.0060.00916.80
7.2.100.0030.00916.63
7.2.90.0060.00616.61
7.2.80.0070.00716.84
7.2.70.0090.00416.71
7.2.60.0020.01316.90
7.2.50.0050.00816.80
7.2.40.0050.00916.97
7.2.30.0050.00816.93
7.2.20.0040.00816.58
7.2.10.0060.00916.93
7.2.00.0030.00917.73
7.1.330.0050.01115.67
7.1.320.0050.00815.71
7.1.310.0080.00615.72
7.1.300.0070.00515.58
7.1.290.0040.00615.63
7.1.280.0030.01015.74
7.1.270.0080.00315.78
7.1.260.0080.00415.72
7.1.250.0070.00415.77
7.1.240.0110.00215.53
7.1.230.0090.00615.64
7.1.220.0040.00715.60
7.1.210.0060.00615.61
7.1.200.0050.00715.83
7.1.190.0020.01215.75
7.1.180.0030.00715.59
7.1.170.0040.00815.61
7.1.160.0050.01015.74
7.1.150.0080.00415.81
7.1.140.0080.00515.72
7.1.130.0080.00815.72
7.1.120.0090.00615.75
7.1.110.0030.00715.81
7.1.100.0070.00616.44
7.1.90.0020.01415.73
7.1.80.0030.01115.67
7.1.70.0040.00416.25
7.1.60.0070.01117.00
7.1.50.0080.00721.96
7.1.40.0070.00615.65
7.1.30.0050.01215.68
7.1.20.0060.00915.46
7.1.10.0050.01115.50
7.1.00.0090.02718.00
7.0.330.0100.00515.05
7.0.320.0050.00515.21
7.0.310.0050.01015.23
7.0.300.0080.00515.19
7.0.290.0030.01115.27
7.0.280.0040.01015.12
7.0.270.0070.00515.19
7.0.260.0050.00715.28
7.0.250.0070.00715.27
7.0.240.0070.00615.40
7.0.230.0070.00415.29
7.0.220.0070.00715.29
7.0.210.0060.00715.19
7.0.200.0030.00915.51
7.0.190.0070.00715.26
7.0.180.0060.00915.34
7.0.170.0060.00815.30
7.0.160.0050.00615.22
7.0.150.0000.01215.07
7.0.140.0080.02617.41
7.0.130.0070.00515.30
7.0.120.0030.00815.21
7.0.110.0030.00615.31
7.0.100.0050.00815.17
7.0.90.0040.00515.32
7.0.80.0120.00315.19
7.0.70.0050.01015.19
7.0.60.0050.03316.85
7.0.50.0070.03316.18
7.0.40.0050.02415.68
7.0.30.0080.02215.57
7.0.20.0150.03215.52
7.0.10.0060.03415.53
7.0.00.0040.03315.58
5.6.400.0070.00714.52
5.6.390.0050.00514.71
5.6.380.0020.01314.14
5.6.370.0090.00714.08
5.6.360.0060.00714.23
5.6.350.0060.00814.23
5.6.340.0050.00614.02
5.6.330.0050.00914.24
5.6.320.0070.00514.32
5.6.310.0070.00714.19
5.6.300.0030.01214.25
5.6.290.0040.00914.08
5.6.280.0060.02816.45
5.6.270.0040.00714.07
5.6.260.0090.00714.17
5.6.250.0070.00714.17
5.6.240.0070.00414.15
5.6.230.0030.01014.23
5.6.220.0080.00314.25
5.6.210.0050.03216.44
5.6.200.0070.02815.57
5.6.190.0080.03116.31
5.6.180.0090.02816.40
5.6.170.0100.02116.29
5.6.160.0060.01816.18
5.6.150.0060.03115.51
5.6.140.0080.02915.57
5.6.130.0030.02915.54
5.6.120.0020.02716.57
5.6.110.0060.03216.38
5.6.100.0050.01916.41
5.6.90.0080.03516.60
5.6.80.0040.02416.33
5.6.70.0050.00714.15
5.6.60.0030.01014.15
5.6.50.0050.00714.11
5.6.40.0030.01013.90
5.6.30.0000.01314.15
5.6.20.0040.00614.10
5.6.10.0040.00614.18
5.6.00.0100.00614.12
5.5.380.0000.00912.66
5.5.370.0040.00412.69
5.5.360.0060.00612.48
5.5.350.0100.03015.11
5.5.340.0060.01714.38
5.5.330.0100.02715.22
5.5.320.0130.02715.27
5.5.310.0140.03015.03
5.5.300.0070.02814.24
5.5.290.0050.03314.19
5.5.280.0030.03315.32
5.5.270.0040.02215.29
5.5.260.0030.03415.25
5.5.250.0030.03315.15
5.5.240.0060.02615.03
5.5.230.0040.00912.38
5.5.220.0080.00312.50
5.5.210.0040.00812.70
5.5.200.0070.00712.43
5.5.190.0070.00612.67
5.5.180.0080.00312.75
5.5.170.0040.01112.61
5.5.160.0080.00312.52
5.5.150.0080.00612.51
5.5.140.0080.00612.51
5.5.130.0040.00912.24
5.5.120.0060.00912.59
5.5.110.0050.00912.52
5.5.100.0120.00312.46
5.5.90.0080.00912.40
5.5.80.0060.00612.29
5.5.70.0050.01012.41
5.5.60.0090.00412.45
5.5.50.0050.00712.51
5.5.40.0060.00712.61
5.5.30.0040.00712.43
5.5.20.0070.00712.31
5.5.10.0050.00812.53
5.5.00.0070.00712.26
5.4.450.0270.02113.75
5.4.440.0100.02513.80
5.4.430.0120.02013.74
5.4.420.0100.02613.46
5.4.410.0060.01913.61
5.4.400.0160.02513.42
5.4.390.0120.02413.27
5.4.380.0040.02313.50
5.4.370.0080.01513.38
5.4.360.0060.01813.45
5.4.350.0050.02311.30
5.4.340.0010.01911.13
5.4.330.0050.00710.70
5.4.320.0040.01811.43
5.4.310.0070.01711.18
5.4.300.0070.01511.23
5.4.290.0060.01711.21
5.4.280.0050.01811.17
5.4.270.0050.01611.30
5.4.260.0030.02011.36
5.4.250.0040.01811.26
5.4.240.0020.01811.26
5.4.230.0050.01811.31
5.4.220.0060.01711.16
5.4.210.0060.02111.34
5.4.200.0080.01611.25
5.4.190.0080.01611.39
5.4.180.0070.01711.32
5.4.170.0040.01811.18
5.4.160.0030.01611.29
5.4.150.0040.01711.32
5.4.140.0060.01611.18
5.4.130.0040.01711.18
5.4.120.0030.01811.17
5.4.110.0070.01511.14
5.4.100.0050.01611.20
5.4.90.0080.01511.20
5.4.80.0030.01811.07
5.4.70.0060.01411.14
5.4.60.0020.01911.14
5.4.50.0080.01411.17
5.4.40.0040.01611.15
5.4.30.0050.01711.10
5.4.20.0050.01711.08
5.4.10.0060.01411.02
5.4.00.0050.01610.78
5.3.290.0040.01811.24
5.3.280.0060.01611.11
5.3.270.0060.01911.18
5.3.260.0040.01811.11
5.3.250.0040.01711.15
5.3.240.0050.01711.04
5.3.230.0040.02011.09
5.3.220.0050.01810.99
5.3.210.0030.02011.03
5.3.200.0050.01410.99
5.3.190.0070.01411.01
5.3.180.0050.01711.12
5.3.170.0080.01411.09
5.3.160.0060.01511.13
5.3.150.0070.01311.12
5.3.140.0040.01711.11
5.3.130.0020.01711.03
5.3.120.0050.01711.10
5.3.110.0070.01611.00
5.3.100.0030.02010.92
5.3.90.0080.01610.97
5.3.80.0040.01910.84
5.3.70.0050.01810.86
5.3.60.0080.01810.91
5.3.50.0040.01910.80
5.3.40.0040.01610.86
5.3.30.0070.01410.81
5.3.20.0060.01210.70
5.3.10.0060.01510.59
5.3.00.0050.01610.64
5.2.170.0050.0159.63
5.2.160.0040.0189.63
5.2.150.0040.0159.63
5.2.140.0040.0199.63
5.2.130.0060.0199.61
5.2.120.0060.0169.61
5.2.110.0020.0209.61
5.2.100.0060.0159.61
5.2.90.0020.0199.61
5.2.80.0050.0179.61
5.2.70.0070.0169.61
5.2.60.0030.0189.59
5.2.50.0030.0189.57
5.2.40.0060.0199.56
5.2.30.0060.0229.54
5.2.20.0040.0199.54
5.2.10.0060.0169.50
5.2.00.0070.0159.43
5.1.60.0040.0139.07
5.1.50.0040.0159.07
5.1.40.0060.0149.06
5.1.30.0050.0169.23
5.1.20.0060.0139.25
5.1.10.0030.0179.11
5.1.00.0060.0149.11
5.0.50.0020.0158.35
5.0.40.0010.0168.28
5.0.30.0040.0208.18
5.0.20.0050.0138.18
5.0.10.0020.0168.17
5.0.00.0060.0178.16
4.4.90.0020.0137.42
4.4.80.0040.0107.41
4.4.70.0030.0117.41
4.4.60.0010.0127.41
4.4.50.0020.0117.42
4.4.40.0020.0187.39
4.4.30.0030.0107.41
4.4.20.0050.0087.46
4.4.10.0030.0107.46
4.4.00.0020.0157.41
4.3.110.0020.0147.37
4.3.100.0040.0097.37
4.3.90.0020.0127.35
4.3.80.0030.0157.32
4.3.70.0010.0127.35
4.3.60.0010.0107.35
4.3.50.0020.0127.35
4.3.40.0010.0177.30
4.3.30.0020.0136.69
4.3.20.0020.0126.68
4.3.10.0030.0126.66
4.3.00.0080.0149.21

preferences:
46.24 ms | 400 KiB | 5 Q