3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Compare two numeric strings (same semantic 1): ('1e1' == '10') = " . (NAN == 0 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 2): ('1E1' == '10') = " . (NAN > 1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 3): ('1e-1' == '0.1') = " . (NAN < 1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 4): ('1E-1' == '0.1') = " . (NAN < -1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 5): ('+1' == '1') = " . (NAN > -1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 6): ('+0' == '-0') = " . (NAN > -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.0040.01118.56
8.3.50.0110.00522.05
8.3.40.0040.01118.84
8.3.30.0070.00719.11
8.3.20.0050.00220.33
8.3.10.0040.00421.91
8.3.00.0040.00418.04
8.2.180.0150.00325.92
8.2.170.0090.00622.96
8.2.160.0130.00020.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00421.02
8.2.110.0060.00320.95
8.2.100.0040.00817.72
8.2.90.0000.00818.09
8.2.80.0000.00919.00
8.2.70.0000.00817.63
8.2.60.0000.00917.80
8.2.50.0030.00618.07
8.2.40.0050.00318.03
8.2.30.0040.00418.06
8.2.20.0060.00317.79
8.2.10.0070.00017.87
8.2.00.0030.00517.67
8.1.280.0170.00325.92
8.1.270.0060.00323.93
8.1.260.0100.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.97
8.1.230.0070.00422.82
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0080.00317.22
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0000.00918.65
8.1.160.0000.00722.07
8.1.150.0070.00318.81
8.1.140.0040.00417.38
8.1.130.0030.00317.77
8.1.120.0030.00317.29
8.1.110.0050.00217.40
8.1.100.0000.00717.45
8.1.90.0000.00717.43
8.1.80.0000.00817.36
8.1.70.0000.00717.33
8.1.60.0070.00317.55
8.1.50.0080.00017.46
8.1.40.0070.00017.49
8.1.30.0030.00517.41
8.1.20.0040.00417.64
8.1.10.0040.00417.46
8.1.00.0040.00417.41
8.0.300.0000.00720.07
8.0.290.0050.00216.63
8.0.280.0030.00518.24
8.0.270.0070.00016.72
8.0.260.0000.00717.21
8.0.250.0000.00716.96
8.0.240.0060.00316.99
8.0.230.0070.00016.96
8.0.220.0040.00416.78
8.0.210.0030.00316.72
8.0.200.0030.00616.96
8.0.190.0000.00716.97
8.0.180.0040.00416.97
8.0.170.0070.00016.88
8.0.160.0070.00016.83
8.0.150.0000.00716.71
8.0.140.0040.00416.89
8.0.130.0030.00313.32
8.0.120.0040.00416.74
8.0.110.0040.00416.88
8.0.100.0000.00716.76
8.0.90.0000.00716.86
8.0.80.0120.00816.80
8.0.70.0040.00316.69
8.0.60.0040.00416.63
8.0.50.0000.00816.70
8.0.30.0120.01117.00
8.0.20.0120.00617.40
8.0.10.0000.00816.98
8.0.00.0050.01416.77
7.4.330.0000.00715.00
7.4.320.0050.00316.36
7.4.300.0060.00016.38
7.4.290.0030.00316.48
7.4.280.0000.00716.35
7.4.270.0000.00716.36
7.4.260.0000.00613.12
7.4.250.0040.00416.35
7.4.240.0020.00516.43
7.4.230.0030.00316.55
7.4.220.0030.01516.58
7.4.210.0000.01416.39
7.4.200.0000.00716.35
7.4.160.0080.00816.38
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0110.00616.42
7.4.120.0120.00516.33
7.4.110.0030.01316.25
7.4.100.0000.02016.46
7.4.90.0100.00716.40
7.4.80.0100.01619.39
7.4.70.0130.00316.20
7.4.60.0060.00916.44
7.4.50.0030.00616.29
7.4.40.0100.00716.44
7.4.30.0080.00816.36
7.4.10.0040.01514.95
7.4.00.0080.00914.71
7.3.330.0030.00313.02
7.3.320.0050.00013.15
7.3.310.0070.00016.20
7.3.300.0060.00016.17
7.3.290.0100.01016.23
7.3.280.0090.00916.28
7.3.270.0160.00417.40
7.3.260.0170.00016.43
7.3.250.0080.01316.34
7.3.240.0060.01516.22
7.3.230.0140.00316.39
7.3.210.0040.01516.41
7.3.200.0090.01219.39
7.3.190.0120.00616.17
7.3.180.0120.00416.32
7.3.170.0080.00816.41
7.3.160.0060.00916.39
7.3.130.0100.01014.53
7.3.120.0070.00814.83
7.3.110.0100.00514.78
7.3.100.0060.00914.79
7.3.90.0080.00614.48
7.3.80.0070.00514.85
7.3.70.0030.01114.71
7.3.60.0060.00514.73
7.3.50.0080.00714.72
7.3.40.0050.00614.69
7.3.30.0120.00214.78
7.3.20.0100.00416.55
7.3.10.0080.00616.64
7.3.00.0060.00416.52
7.2.330.0130.00316.56
7.2.320.0070.01016.44
7.2.310.0060.00916.72
7.2.300.0160.00016.63
7.2.290.0080.00816.54
7.2.260.0080.01214.90
7.2.250.0080.00915.17
7.2.240.0130.00314.94
7.2.230.0080.00814.79
7.2.220.0090.00614.80
7.2.210.0070.00814.96
7.2.200.0070.00614.84
7.2.190.0070.00814.94
7.2.180.0080.00314.98
7.2.170.0020.01014.86
7.2.160.0070.00415.04
7.2.150.0000.01216.79
7.2.140.0030.00616.81
7.2.130.0060.00516.75
7.2.120.0030.00816.76
7.2.110.0050.00516.54
7.2.100.0020.01216.83
7.2.90.0050.01116.73
7.2.80.0090.00416.71
7.2.70.0030.01016.87
7.2.60.0030.01116.56
7.2.50.0090.00216.67
7.2.40.0040.00916.69
7.2.30.0050.00916.81
7.2.20.0110.00316.73
7.2.10.0060.00816.67
7.2.00.0040.01017.62
7.1.330.0040.00915.68
7.1.320.0080.00815.62
7.1.310.0100.00315.58
7.1.300.0100.00515.62
7.1.290.0060.00315.62
7.1.280.0020.00815.66
7.1.270.0070.00515.51
7.1.260.0110.00015.72
7.1.250.0070.00715.49
7.1.240.0030.01215.58
7.1.230.0060.00615.61
7.1.220.0030.01415.76
7.1.210.0070.00715.63
7.1.200.0000.01015.62
7.1.190.0100.00315.79
7.1.180.0070.00715.69
7.1.170.0060.00315.78
7.1.160.0090.00315.37
7.1.150.0070.00715.35
7.1.140.0000.01215.58
7.1.130.0070.00415.80
7.1.120.0000.01115.47
7.1.110.0060.00615.73
7.1.100.0070.00716.81
7.1.90.0040.00415.61
7.1.80.0000.01015.85
7.1.70.0030.00716.36
7.1.60.0050.01017.55
7.1.50.0060.01225.12
7.1.40.0070.00715.51
7.1.30.0030.00815.60
7.1.20.0060.00615.85
7.1.10.0000.00815.80
7.1.00.0050.04118.81
7.0.330.0000.00815.27
7.0.320.0030.01415.07
7.0.310.0000.00915.07
7.0.300.0090.00315.03
7.0.290.0080.00015.43
7.0.280.0030.00715.43
7.0.270.0100.00315.21
7.0.260.0060.00615.07
7.0.250.0000.00915.36
7.0.240.0040.00415.34
7.0.230.0070.00415.39
7.0.220.0030.00915.26
7.0.210.0060.00915.41
7.0.200.0030.00416.04
7.0.190.0060.00615.36
7.0.180.0090.00315.38
7.0.170.0000.00915.38
7.0.160.0000.01315.13
7.0.150.0100.00315.29
7.0.140.0070.04018.50
7.0.130.0000.00915.43
7.0.120.0070.00715.36
7.0.110.0100.00315.40
7.0.100.0050.00615.45
7.0.90.0090.00615.01
7.0.80.0040.00715.24
7.0.70.0000.01315.40
7.0.60.0100.02517.70
7.0.50.0070.04416.59
7.0.40.0050.04216.75
7.0.30.0200.04016.83
7.0.20.0150.04316.75
7.0.10.0110.02416.73
7.0.00.0070.02516.78
5.6.400.0070.01014.07
5.6.390.0100.00314.06
5.6.380.0090.00614.32
5.6.370.0040.00814.22
5.6.360.0120.00314.51
5.6.350.0110.00014.52
5.6.340.0030.01214.55
5.6.330.0140.00014.29
5.6.320.0110.00313.98
5.6.310.0130.00314.25
5.6.300.0060.00914.24
5.6.290.0030.01314.08
5.6.280.0040.03617.47
5.6.270.0040.01114.26
5.6.260.0030.00614.13
5.6.250.0040.00414.43
5.6.240.0090.00614.44
5.6.230.0000.00914.07
5.6.220.0120.00314.13
5.6.210.0050.04517.37
5.6.200.0080.03216.16
5.6.190.0080.04117.36
5.6.180.0030.03017.34
5.6.170.0140.02417.31
5.6.160.0080.02517.24
5.6.150.0050.02416.05
5.6.140.0040.03216.22
5.6.130.0030.03516.22
5.6.120.0050.03517.67
5.6.110.0050.04417.64
5.6.100.0060.04317.56
5.6.90.0050.04517.76
5.6.80.0080.04317.36
5.6.70.0120.02217.25
5.6.60.0080.00414.12
5.6.50.0080.00813.95
5.6.40.0050.00514.01
5.6.30.0090.00914.05
5.6.20.0120.00614.43
5.6.10.0000.01514.04
5.6.00.0030.00914.22
5.5.380.0040.00714.34
5.5.370.0000.01014.20
5.5.360.0110.00314.50
5.5.350.0110.03017.30
5.5.340.0000.02815.92
5.5.330.0050.04917.28
5.5.320.0030.04417.31
5.5.310.0120.04917.26
5.5.300.0160.02016.24
5.5.290.0020.04816.19
5.5.280.0030.04717.34
5.5.270.0050.04817.25
5.5.260.0050.04617.44
5.5.250.0070.02917.37
5.5.240.0120.04017.10
5.5.230.0100.00314.13
5.5.220.0000.01014.23
5.5.210.0110.00414.13
5.5.200.0070.00714.00
5.5.190.0030.00613.66
5.5.180.0140.00313.81
5.5.170.0080.00414.06
5.5.160.0030.00914.19
5.5.150.0070.01014.25
5.5.140.0090.00013.83
5.5.130.0070.00313.91
5.5.120.0030.01314.14
5.5.110.0040.00713.73
5.5.100.0070.00713.92
5.5.90.0000.01614.24
5.5.80.0040.00713.98
5.5.70.0120.00314.44
5.5.60.0060.00613.93
5.5.50.0110.00414.13
5.5.40.0070.00714.06
5.5.30.0120.00413.97
5.5.20.0070.00413.89
5.5.10.0100.00313.65
5.5.00.0000.01314.28
5.4.450.0450.03515.31
5.4.440.0530.03915.00
5.4.430.0250.03415.15
5.4.420.0430.03915.10
5.4.410.0080.03014.79
5.4.400.0170.03414.80
5.4.390.0220.03014.79
5.4.380.0090.02614.69
5.4.370.0080.02314.66
5.4.360.0040.02514.80
5.4.350.0060.02311.52
5.4.340.0080.01811.42
5.4.330.0030.00710.71
5.4.320.0040.03011.73
5.4.310.0050.02211.80
5.4.300.0050.02311.61
5.4.290.0050.02311.61
5.4.280.0070.01911.48
5.4.270.0050.02211.71
5.4.260.0040.02611.51
5.4.250.0080.02111.61
5.4.240.0050.03111.63
5.4.230.0090.02811.43
5.4.220.0130.02411.59
5.4.210.0100.02411.67
5.4.200.0070.02311.67
5.4.190.0080.02911.56
5.4.180.0060.02811.59
5.4.170.0080.01811.76
5.4.160.0040.02411.46
5.4.150.0100.01811.59
5.4.140.0030.02611.55
5.4.130.0070.02211.35
5.4.120.0040.02611.28
5.4.110.0060.02211.35
5.4.100.0050.02311.39
5.4.90.0080.02111.34
5.4.80.0040.02511.24
5.4.70.0110.01611.42
5.4.60.0040.02411.33
5.4.50.0060.02511.44
5.4.40.0020.02411.46
5.4.30.0040.02811.43
5.4.20.0060.02811.30
5.4.10.0080.02711.34
5.4.00.0020.02511.15
5.3.290.0060.02211.61
5.3.280.0060.02211.51
5.3.270.0030.02511.43
5.3.260.0080.02011.54
5.3.250.0040.02111.43
5.3.240.0050.02211.50
5.3.230.0080.02311.51
5.3.220.0060.02211.45
5.3.210.0020.02411.44
5.3.200.0070.01811.35
5.3.190.0040.02311.48
5.3.180.0020.02411.51
5.3.170.0060.01811.54
5.3.160.0070.02011.52
5.3.150.0060.02111.54
5.3.140.0050.02111.53
5.3.130.0070.02911.48
5.3.120.0070.02911.39
5.3.110.0080.02611.48
5.3.100.0070.02511.21
5.3.90.0060.02711.23
5.3.80.0080.02711.14
5.3.70.0080.02911.15
5.3.60.0080.02511.23
5.3.50.0050.02211.09
5.3.40.0030.02411.11
5.3.30.0040.02111.03
5.3.20.0050.02210.96
5.3.10.0100.02410.79
5.3.00.0060.02610.80
5.2.170.0020.0369.20
5.2.160.0060.0289.19
5.2.150.0040.0339.19
5.2.140.0080.0289.19
5.2.130.0110.0359.15
5.2.120.0060.0289.15
5.2.110.0040.0319.16
5.2.100.0030.0329.15
5.2.90.0040.0319.15
5.2.80.0050.0399.14
5.2.70.0080.0409.15
5.2.60.0070.0419.11
5.2.50.0070.0389.07
5.2.40.0080.0499.04
5.2.30.0090.0379.02
5.2.20.0040.0409.01
5.2.10.0070.0378.93
5.2.00.0100.0378.79
5.1.60.0050.0338.07
5.1.50.0100.0298.07
5.1.40.0090.0298.05
5.1.30.0040.0378.41
5.1.20.0030.0298.43
5.1.10.0040.0278.15
5.1.00.0040.0278.15
5.0.50.0040.0206.63
5.0.40.0040.0196.49
5.0.30.0030.0326.30
5.0.20.0040.0266.30
5.0.10.0030.0296.28
5.0.00.0070.0296.27
4.4.90.0030.0164.78
4.4.80.0020.0164.76
4.4.70.0020.0164.75
4.4.60.0030.0164.75
4.4.50.0020.0194.77
4.4.40.0040.0244.71
4.4.30.0020.0174.76
4.4.20.0020.0174.84
4.4.10.0030.0164.84
4.4.00.0030.0254.76
4.3.110.0050.0144.67
4.3.100.0040.0144.66
4.3.90.0050.0124.63
4.3.80.0020.0254.58
4.3.70.0040.0144.63
4.3.60.0030.0194.63
4.3.50.0040.0164.62
4.3.40.0020.0254.54
4.3.30.0020.0163.32
4.3.20.0030.0153.30
4.3.10.0010.0203.26
4.3.00.0100.0307.57

preferences:
38.91 ms | 400 KiB | 5 Q