3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo "Compare non numeric string to string 0: ('str' == '0') = " . ('str' == '0' ? 'true' : 'false') . "\n"; echo "Compare non numeric string to integer 0: ('str' == 0) = " . ('str' == 0 ? 'true' : 'false') . "\n"; echo "Compare evtl. numeric string to string: ('1string' == '1') = " . ('1string' == '1' ? 'true' : 'false') . "\n"; echo "Compare evtl. numeric string to number: ('1string' == 1) = " . ('1string' == 1 ? 'true' : 'false') . "\n"; 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"; echo "Compare two numeric strings (hex): ('0x0A' == '10') = " . ('0x0A' == '10' ? '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.5.30.0090.00817.55
8.5.20.0090.00916.52
8.5.10.0050.01220.20
8.5.00.0130.00819.80
8.4.180.0110.01120.56
8.4.170.0070.00323.67
8.4.160.0150.00923.92
8.4.150.0090.00516.88
8.4.140.0150.00617.56
8.4.130.0070.00317.97
8.4.120.0060.00222.27
8.4.110.0040.00422.48
8.4.100.0110.01017.80
8.4.90.0120.00917.36
8.4.80.0050.00417.77
8.4.70.0110.01018.02
8.4.60.0130.00817.63
8.4.50.0130.00917.75
8.4.40.0130.00617.47
8.4.30.0130.00617.54
8.4.20.0130.00717.49
8.4.10.0060.00317.79
8.3.300.0110.00920.88
8.3.290.0140.00620.80
8.3.280.0120.00818.56
8.3.270.0090.01116.60
8.3.260.0140.00616.55
8.3.250.0090.00719.05
8.3.240.0070.00116.83
8.3.230.0120.00616.51
8.3.220.0030.00517.01
8.3.210.0090.01016.51
8.3.200.0120.00816.79
8.3.190.0070.01116.80
8.3.180.0030.00518.44
8.3.170.0100.00716.70
8.3.160.0110.00818.29
8.3.150.0060.01217.16
8.3.140.0000.00818.92
8.3.130.0060.00318.47
8.3.120.0060.00320.54
8.3.110.0040.00416.38
8.3.100.0030.00618.58
8.3.90.0090.00926.77
8.3.80.0120.00017.97
8.3.70.0160.00718.43
8.3.60.0150.00416.73
8.3.50.0090.01221.86
8.3.40.0090.00918.79
8.3.30.0120.00919.09
8.3.20.0000.00720.37
8.3.10.0080.00023.55
8.3.00.0040.00419.11
8.2.300.0120.00918.86
8.2.290.0110.01120.57
8.2.280.0130.00718.46
8.2.270.0040.01516.71
8.2.260.0140.00418.54
8.2.250.0040.00417.29
8.2.240.0060.00317.35
8.2.230.0060.00920.94
8.2.220.0090.00324.06
8.2.210.0080.00026.77
8.2.200.0060.00318.04
8.2.190.0060.00916.58
8.2.180.0120.00316.50
8.2.170.0060.00918.79
8.2.160.0100.00722.96
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00721.11
8.2.110.0040.00720.96
8.2.100.0090.00317.63
8.2.90.0040.00419.28
8.2.80.0080.00017.97
8.2.70.0090.00317.36
8.2.60.0050.00517.90
8.2.50.0000.00818.07
8.2.40.0050.00319.82
8.2.30.0020.00517.87
8.2.20.0030.00517.73
8.2.10.0000.00717.83
8.2.00.0040.00418.01
8.1.340.0120.00719.62
8.1.330.0130.00616.41
8.1.320.0120.00716.10
8.1.310.0160.00416.36
8.1.300.0080.00021.62
8.1.290.0040.00730.84
8.1.280.0160.00625.92
8.1.270.0110.00720.38
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0000.00822.80
8.1.230.0040.00817.42
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0100.00417.22
8.1.190.0050.00317.10
8.1.180.0040.00418.10
8.1.170.0040.00420.19
8.1.160.0080.00022.03
8.1.150.0040.00418.74
8.1.140.0050.00317.28
8.1.130.0000.00717.72
8.1.120.0000.00717.32
8.1.110.0040.00417.32
8.1.100.0040.00417.40
8.1.90.0050.00317.39
8.1.80.0040.00417.43
8.1.70.0080.00017.38
8.1.60.0000.00917.56
8.1.50.0040.00417.49
8.1.40.0060.00617.36
8.1.30.0080.00017.59
8.1.20.0000.00817.64
8.1.10.0050.00517.29
8.1.00.0060.00317.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00418.35
8.0.270.0030.00317.25
8.0.260.0030.00317.12
8.0.250.0040.00416.85
8.0.240.0000.00616.96
8.0.230.0000.00716.87
8.0.220.0030.00516.82
8.0.210.0050.00216.80
8.0.200.0000.00916.93
8.0.190.0040.00416.96
8.0.180.0050.00216.93
8.0.170.0000.00716.82
8.0.160.0030.00316.75
8.0.150.0070.00016.74
8.0.140.0040.00416.75
8.0.130.0050.00313.41
8.0.120.0000.00816.85
8.0.110.0000.00816.79
8.0.100.0070.00016.80
8.0.90.0000.00816.73
8.0.80.0130.01016.86
8.0.70.0040.00416.85
8.0.60.0030.00616.64
8.0.50.0000.00716.70
8.0.30.0070.01116.95
8.0.20.0080.01017.40
8.0.10.0000.00716.98
8.0.00.0140.00416.82
7.4.330.0020.00215.03
7.4.320.0040.00416.41
7.4.300.0000.00616.40
7.4.290.0030.00316.34
7.4.280.0050.00216.39
7.4.270.0000.00616.42
7.4.260.0070.00016.46
7.4.250.0050.00316.31
7.4.240.0060.00216.44
7.4.230.0000.00716.23
7.4.220.0120.00616.51
7.4.210.0070.00716.36
7.4.200.0030.00616.28
7.4.160.0150.00916.61
7.4.150.0150.00317.40
7.4.140.0120.00817.86
7.4.130.0130.00616.41
7.4.120.0150.00216.44
7.4.110.0100.00716.62
7.4.100.0110.00916.55
7.4.90.0090.00916.43
7.4.80.0100.00719.39
7.4.70.0180.00616.41
7.4.60.0100.00616.52
7.4.50.0000.00516.14
7.4.40.0070.01116.25
7.4.30.0070.01316.34
7.4.00.0140.00314.59
7.3.330.0000.00613.17
7.3.320.0040.00713.21
7.3.310.0030.00316.24
7.3.300.0040.00416.17
7.3.290.0110.00516.30
7.3.280.0150.00516.27
7.3.270.0040.01317.40
7.3.260.0060.01016.28
7.3.250.0060.01216.32
7.3.240.0060.01216.30
7.3.230.0170.00616.39
7.3.210.0140.00416.27
7.3.200.0100.00719.39
7.3.190.0100.00716.58
7.3.180.0090.00616.18
7.3.170.0100.00716.32
7.3.160.0100.00716.36
7.3.10.0050.00516.75
7.3.00.0040.00816.45
7.2.330.0050.01416.35
7.2.320.0110.01116.52
7.2.310.0070.01116.75
7.2.300.0060.00916.52
7.2.290.0140.00316.68
7.2.130.0030.00916.76
7.2.120.0040.00816.81
7.2.110.0140.00716.93
7.2.100.0100.00616.63
7.2.90.0070.00617.04
7.2.80.0080.00317.01
7.2.70.0040.00716.89
7.2.60.0060.00816.74
7.2.50.0040.00816.96
7.2.40.0040.01116.80
7.2.30.0040.00416.96
7.2.20.0030.00616.58
7.2.10.0030.01016.74
7.2.00.0020.00918.05
7.1.250.0030.01115.45
7.1.200.0150.00615.61
7.1.100.0080.00418.00
7.1.70.0000.01016.99
7.1.60.0100.01319.50
7.1.50.0270.01034.69
7.1.00.0070.07322.37
7.0.200.0030.00616.57
7.0.60.0130.05019.89
7.0.50.0100.04017.85
7.0.40.0070.08720.21
7.0.30.0500.06320.21
7.0.20.0300.04020.16
7.0.10.0170.08020.11
7.0.00.0130.07720.32
5.6.280.0030.07320.92
5.6.210.0130.07020.72
5.6.200.0070.06318.21
5.6.190.0030.05020.67
5.6.180.1870.04020.27
5.6.170.0330.06720.45
5.6.160.0100.08020.61
5.6.150.0170.06718.13
5.6.140.0030.04018.18
5.6.130.0170.07018.07
5.6.120.0100.06721.13
5.6.110.0030.08321.03
5.6.100.0100.07021.08
5.6.90.0100.07720.89
5.6.80.0030.05020.46
5.5.350.0070.08020.44
5.5.340.0030.05018.05
5.5.330.0100.08020.36
5.5.320.0400.07720.29
5.5.310.0070.05020.34
5.5.300.0100.06018.07
5.5.290.0030.07017.86
5.5.280.0100.08720.90
5.5.270.0100.08020.62
5.5.260.0130.07320.74
5.5.250.0030.09320.78
5.5.240.0070.07020.28
5.4.450.0230.04719.12
5.4.440.0200.04319.41
5.4.430.0230.07319.54
5.4.420.0230.06319.45
5.4.410.0270.05019.35
5.4.400.0200.04018.89
5.4.390.0200.03319.08
5.4.380.0170.03719.25
5.4.370.0030.04318.88
5.4.360.0070.04319.09
5.4.350.0170.03319.08
5.4.340.0170.03319.22
5.4.320.0100.04019.06
5.4.310.0130.03719.08
5.4.300.0170.03318.88
5.4.290.0170.04318.80
5.4.280.0300.02719.03
5.4.270.0130.03719.16
5.4.260.0200.05019.21
5.4.250.0170.03319.23
5.4.240.0070.04318.80
5.4.230.0230.03318.92
5.4.220.0100.04719.12
5.4.210.0270.02718.78
5.4.200.0130.03719.13
5.4.190.0230.03719.06
5.4.180.0170.04319.15
5.4.170.0230.03719.24
5.4.160.0130.05019.11
5.4.150.0100.04319.06
5.4.140.0270.03716.16
5.4.130.0270.03716.54
5.4.120.0270.04716.30
5.4.110.0230.05716.50
5.4.100.0230.05016.22
5.4.90.0230.07016.22
5.4.80.0300.06316.37
5.4.70.0170.07316.29
5.4.60.0130.04716.45
5.4.50.0130.04016.40
5.4.40.0230.07316.31
5.4.30.0330.03316.36
5.4.20.0330.03016.43
5.4.10.0230.04016.45
5.4.00.0130.06715.89
5.3.290.0130.03714.52
5.3.280.0130.03714.46
5.3.270.0170.04714.55
5.3.260.0100.04714.55
5.3.250.0330.05714.57
5.3.240.0200.08014.61
5.3.230.0270.04714.45
5.3.220.0200.05714.61
5.3.210.0130.04314.61
5.3.200.0230.04314.42
5.3.190.0300.06714.61
5.3.180.0200.07714.52
5.3.170.0270.05714.67
5.3.160.0200.03314.44
5.3.150.0100.04314.56
5.3.140.0170.04314.51
5.3.130.0170.05014.50
5.3.120.0230.04014.65
5.3.110.0200.06314.54
5.3.100.0070.07714.09
5.3.90.0070.04713.98
5.3.80.0400.05014.12
5.3.70.0130.07013.91
5.3.60.0070.06714.11
5.3.50.0070.06313.77
5.3.40.0130.07313.73
5.3.30.0070.07013.75
5.3.20.0000.05313.58
5.3.10.0070.07013.47
5.3.00.0070.06713.45
5.2.170.0100.05312.21
5.2.160.0070.05312.21
5.2.150.0000.05312.21
5.2.140.0000.04712.21
5.2.130.0030.03312.21
5.2.120.0030.05712.21
5.2.110.0030.04312.21
5.2.100.0100.05712.21
5.2.90.0000.04012.21
5.2.80.0070.05712.21
5.2.70.0070.04712.21
5.2.60.0030.05712.21
5.2.50.0000.04712.21
5.2.40.0170.05312.21
5.2.30.0070.06012.21
5.2.20.0030.04712.21
5.2.10.0100.05012.21
5.2.00.0030.04712.21
5.1.60.0000.05712.21
5.1.50.0030.05712.21
5.1.40.0030.05012.21
5.1.30.0100.04312.21
5.1.20.0070.05712.21
5.1.10.0070.03012.21
5.1.00.0000.03312.21
5.0.50.0000.04712.21
5.0.40.0030.04312.21
5.0.30.0030.05012.21
5.0.20.0000.03312.21
5.0.10.0000.03712.21
5.0.00.0030.06712.21
4.4.90.0000.03012.21
4.4.80.0000.03012.21
4.4.70.0000.02712.21
4.4.60.0030.02312.21
4.4.50.0030.03312.21
4.4.40.0000.05312.21
4.4.30.0000.02712.21
4.4.20.0000.03712.21
4.4.10.0000.02012.21
4.4.00.0000.02312.21
4.3.110.0100.02712.21
4.3.100.0000.02312.21
4.3.90.0030.02712.21
4.3.80.0000.03012.21
4.3.70.0030.02012.21
4.3.60.0000.03312.21
4.3.50.0030.01712.21
4.3.40.0000.04712.21
4.3.30.0000.01712.21
4.3.20.0000.04012.21
4.3.10.0000.01712.21
4.3.00.0000.01712.21

preferences:
120.46 ms | 2543 KiB | 5 Q