3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(1 + 1); // int 2 var_dump('1' + '1'); //int 2 class One { public function __toString() { return '1'; } } var_dump(new One + new One); // Object of class One could not be converted to int int 2 var_dump((string)new One + (string)new One); // int 2 var_dump(2 + 2); // int 4 var_dump('2' + '2'); // int 4 class Two { public function __toString() { return '2'; } } var_dump(new Two + new Two); // Notice: Object of class Two could not be converted to int int 2 var_dump((string)new Two + (string)new Two); // int 4

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.01116.87
8.3.50.0100.01122.11
8.3.40.0150.00718.98
8.3.30.0140.00018.96
8.3.20.0000.00720.37
8.3.10.0040.00423.61
8.3.00.0050.00517.50
8.2.180.0090.00918.34
8.2.170.0170.00322.96
8.2.160.0100.00320.39
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0130.00626.16
8.2.120.0040.00422.08
8.2.110.0070.00322.11
8.2.100.0080.00318.22
8.2.90.0050.00519.21
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0040.00418.05
8.2.50.0080.00018.11
8.2.40.0000.00820.50
8.2.30.0040.00420.96
8.2.20.0080.00017.82
8.2.10.0020.00517.66
8.2.00.0000.00817.68
8.1.280.0130.00725.92
8.1.270.0040.00423.96
8.1.260.0040.00726.35
8.1.250.0040.00428.09
8.1.240.0050.00323.88
8.1.230.0080.00320.37
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0030.00618.65
8.1.160.0040.00418.84
8.1.150.0050.00220.04
8.1.140.0000.00817.41
8.1.130.0070.00017.75
8.1.120.0000.00817.31
8.1.110.0040.00417.43
8.1.100.0040.00417.43
8.1.90.0020.00517.45
8.1.80.0000.00717.30
8.1.70.0000.00717.29
8.1.60.0030.00517.52
8.1.50.0040.00417.33
8.1.40.0000.00717.45
8.1.30.0040.00417.58
8.1.20.0090.00017.51
8.1.10.0000.00817.38
8.1.00.0000.00817.47
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.45
8.0.270.0000.00717.26
8.0.260.0000.00716.78
8.0.250.0000.00817.04
8.0.240.0040.00417.02
8.0.230.0050.00317.04
8.0.220.0070.00017.01
8.0.210.0040.00416.81
8.0.200.0030.00316.91
8.0.190.0040.00416.86
8.0.180.0070.00016.93
8.0.170.0050.00317.01
8.0.160.0080.00016.95
8.0.150.0030.00416.95
8.0.140.0030.00516.86
8.0.130.0050.00313.39
8.0.120.0050.00316.97
8.0.110.0040.00416.97
8.0.100.0070.00016.93
8.0.90.0000.00816.94
8.0.80.0070.00717.01
8.0.70.0000.00917.04
8.0.60.0050.00316.88
8.0.50.0050.00216.79
8.0.30.0110.00917.16
8.0.20.0100.01017.40
8.0.10.0040.00417.06
8.0.00.0100.01116.83
7.4.330.0000.00515.03
7.4.320.0000.00716.49
7.4.300.0060.00016.54
7.4.290.0030.00316.61
7.4.280.0030.00316.44
7.4.270.0030.00316.55
7.4.260.0070.00016.52
7.4.250.0070.00016.45
7.4.240.0020.00616.49
7.4.230.0040.00316.46
7.4.220.0100.00716.50
7.4.210.0060.00816.49
7.4.200.0070.00016.54
7.4.190.0070.00016.42
7.4.160.0120.00316.51
7.4.150.0000.01717.40
7.4.140.0100.00917.86
7.4.130.0070.00916.53
7.4.120.0100.00816.60
7.4.110.0060.01116.35
7.4.100.0090.01016.53
7.4.90.0120.00616.45
7.4.80.0100.01019.39
7.4.70.0060.01016.43
7.4.60.0140.00316.32
7.4.50.0000.00516.45
7.4.40.0030.01222.77
7.4.30.0070.01116.14
7.4.00.0020.01614.74
7.3.330.0050.00013.30
7.3.320.0030.00313.36
7.3.310.0000.00816.35
7.3.300.0070.00016.39
7.3.290.0110.00416.38
7.3.280.0090.00516.34
7.3.270.0060.01117.40
7.3.260.0030.01416.30
7.3.250.0080.00916.46
7.3.240.0040.01216.34
7.3.230.0070.01416.39
7.3.210.0070.01116.47
7.3.200.0110.01119.39
7.3.190.0100.01316.43
7.3.180.0070.01016.30
7.3.170.0110.00416.30
7.3.160.0040.01316.38
7.3.120.0070.01014.95
7.3.110.0060.00814.87
7.3.100.0030.01114.73
7.3.90.0070.00914.80
7.3.80.0080.00814.88
7.3.70.0020.01014.67
7.3.60.0080.00314.67
7.3.50.0050.00714.90
7.3.40.0030.01014.76
7.3.30.0050.01014.84
7.3.20.0050.00516.58
7.3.10.0020.01316.53
7.3.00.0090.00616.64
7.2.330.0130.00716.51
7.2.320.0120.00616.46
7.2.310.0090.01216.38
7.2.300.0050.01116.82
7.2.290.0060.01116.31
7.2.250.0100.01014.85
7.2.240.0030.01714.94
7.2.230.0060.01015.05
7.2.220.0060.00815.12
7.2.210.0040.00715.00
7.2.200.0070.00514.96
7.2.190.0060.00714.99
7.2.180.0070.00515.06
7.2.170.0050.00715.06
7.2.60.0070.00716.70
7.2.50.0030.01016.66
7.1.330.0050.00915.75
7.1.320.0020.00815.75
7.1.310.0100.00115.39
7.1.300.0050.01015.61
7.1.290.0020.01015.80
7.1.280.0030.00815.70
7.1.270.0070.00415.56
7.1.260.0060.00915.71
7.1.200.0120.00915.41
7.1.70.0000.00917.09
7.1.60.0110.01119.31
7.1.50.0040.02116.95
7.1.00.0100.07022.48
7.0.200.0050.00916.63
7.0.140.0130.06021.98
7.0.100.0070.07719.97
7.0.90.0230.04019.94
7.0.80.0200.07720.01
7.0.70.0100.04020.01
7.0.60.0370.08319.87
7.0.50.0330.08020.38
7.0.40.0070.08020.00
7.0.30.0030.05320.19
7.0.20.0130.07320.13
7.0.10.0100.06320.18
7.0.00.0070.07720.12
5.6.280.0030.07320.86
5.6.250.0100.04720.57
5.6.240.0270.02320.63
5.6.230.0070.04720.63
5.6.220.0070.07720.65
5.6.210.0070.04720.73
5.6.200.0030.08021.04
5.6.190.0130.06321.06
5.6.180.0130.07321.11
5.6.170.0070.04321.09
5.6.160.0130.08020.95
5.6.150.0030.04021.06
5.6.140.0030.05021.05
5.6.130.0100.07721.05
5.6.120.0100.07321.02
5.6.110.0100.08020.92
5.6.100.0100.04720.95
5.6.90.0100.06321.15
5.6.80.0100.05720.47
5.6.70.0070.04020.55
5.6.60.0030.06720.40
5.6.50.0030.08320.34
5.6.40.0130.06720.40
5.6.30.0070.08020.42
5.6.20.0000.04020.38
5.6.10.0100.06720.29
5.6.00.0030.03720.41
5.5.380.0030.08020.42
5.5.370.0070.08720.39
5.5.360.0070.07720.35
5.5.350.0070.04720.42
5.5.340.0030.06320.91
5.5.330.0070.04320.77
5.5.320.0030.06020.92
5.5.310.0000.06020.80
5.5.300.0000.08020.77
5.5.290.0070.08320.80
5.5.280.0170.07020.90
5.5.270.0170.06320.71
5.5.260.0030.06020.92
5.5.250.0100.07720.64
5.5.240.0070.04320.27
5.5.230.0100.07720.19
5.5.220.0000.04320.18
5.5.210.0070.07320.18
5.5.200.0030.08320.19
5.5.190.0070.08720.27
5.5.180.0000.07320.23
5.5.160.0100.04020.23
5.5.150.0030.04020.27
5.5.140.0030.08020.14
5.5.130.0100.07720.25
5.5.120.0030.04020.25
5.5.110.0170.06320.07
5.5.100.0030.08020.02
5.5.90.0070.03720.13
5.5.80.0100.05720.09
5.5.70.0030.08320.00
5.5.60.0130.07320.09
5.5.50.0070.07720.00
5.5.40.0000.07319.93
5.5.30.0000.05020.13
5.5.20.0130.06719.93
5.5.10.0070.05019.98
5.5.00.0070.07020.05
5.4.450.0070.04019.37
5.4.440.0070.03719.20
5.4.430.0130.02719.52
5.4.420.0070.06719.55
5.4.410.0130.02719.32
5.4.400.0070.03318.91
5.4.390.0070.06718.88
5.4.380.0030.04018.85
5.4.370.0070.03318.84
5.4.360.0100.06018.90
5.4.350.0030.04019.09
5.4.340.0100.06319.14
5.4.320.0030.08019.00
5.4.310.0100.07318.90
5.4.300.0000.04019.18
5.4.290.0030.07019.04
5.4.280.0100.04319.03
5.4.270.0030.06318.90
5.4.260.0100.07019.18
5.4.250.0100.07019.12
5.4.240.0070.06319.08
5.4.230.0030.07719.18
5.4.220.0100.05319.17
5.4.210.0030.04719.11
5.4.200.0100.03319.10
5.4.190.0200.06719.17
5.4.180.0100.07018.86
5.4.170.0070.05719.02
5.4.160.0130.07019.11
5.4.150.0100.07019.10
5.4.140.0070.03316.52
5.4.130.0200.05716.49
5.4.120.0000.05016.24
5.4.110.0070.06716.48
5.4.100.0100.06016.49
5.4.90.0200.05016.49
5.4.80.0100.06716.50
5.4.70.0030.04016.43
5.4.60.0070.06716.25
5.4.50.0070.05716.44
5.4.40.0130.06016.53
5.4.30.0030.04316.27
5.4.20.0030.07316.39
5.4.10.0070.07316.24
5.4.00.0070.08015.94
5.3.290.0130.06714.62
5.3.280.0130.04014.67
5.3.270.0030.08014.53
5.3.260.0100.07714.73
5.3.250.0170.06014.66
5.3.240.0070.03314.66
5.3.230.0070.07714.67
5.3.220.0000.05014.64
5.3.210.0200.05714.67
5.3.200.0130.07014.71
5.3.190.0030.04714.69
5.3.180.0170.06014.63
5.3.170.0100.04014.63
5.3.160.0030.05314.59
5.3.150.0000.04314.63
5.3.140.0000.04714.56
5.3.130.0130.06314.58
5.3.120.0000.05014.54
5.3.110.0070.05314.48
5.3.100.0100.06314.02
5.3.90.0130.05713.97
5.3.80.0070.03314.14
5.3.70.0000.06314.00
5.3.60.0100.07013.90
5.3.50.0070.07013.88
5.3.40.0000.04314.07
5.3.30.0070.05313.96
5.3.20.0070.06313.72
5.3.10.0030.03713.79
5.3.00.0070.04013.55
5.2.170.0030.03711.14
5.2.160.0030.06311.21
5.2.150.0030.06311.05
5.2.140.0000.03311.00
5.2.130.0030.06011.10
5.2.120.0100.05711.24
5.2.110.0100.05711.20
5.2.100.0030.06310.96
5.2.90.0030.06011.01
5.2.80.0070.06011.12
5.2.70.0030.03311.19
5.2.60.0030.05711.17
5.2.50.0070.03311.08
5.2.40.0030.05711.05
5.2.30.0000.04711.09
5.2.20.0030.05311.05
5.2.10.0130.04710.89
5.2.00.0100.05310.86
5.1.60.0000.03710.01
5.1.50.0030.0309.85
5.1.40.0000.0309.97
5.1.30.0030.05010.36
5.1.20.0070.02710.42
5.1.10.0030.03710.15
5.1.00.0070.05710.20
5.0.50.0000.0309.00
5.0.40.0100.0379.00
5.0.30.0000.0679.00
5.0.20.0070.0179.00
5.0.10.0030.0439.00
5.0.00.0030.0439.00
4.4.90.0070.0139.00
4.4.80.0070.0309.00
4.4.70.0070.0139.00
4.4.60.0000.0339.00
4.4.50.0030.0209.00
4.4.40.0070.0479.00
4.4.30.0070.0309.00
4.4.20.0000.0379.00
4.4.10.0030.0239.00
4.4.00.0030.0339.00
4.3.110.0100.0279.00
4.3.100.0000.0179.00
4.3.90.0070.0239.00
4.3.80.0030.0439.00
4.3.70.0030.0139.00
4.3.60.0070.0279.00
4.3.50.0000.0339.00
4.3.40.0030.0409.00
4.3.30.0030.0179.00
4.3.20.0030.0239.00
4.3.10.0000.0409.00
4.3.00.0000.0179.00

preferences:
63.67 ms | 401 KiB | 5 Q