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.0090.00918.43
8.3.50.0160.00317.46
8.3.40.0150.00018.79
8.3.30.0030.01018.68
8.3.20.0060.00918.72
8.3.10.0040.00420.66
8.3.00.0030.00517.50
8.2.180.0120.00916.75
8.2.170.0070.00722.96
8.2.160.0070.00722.31
8.2.150.0090.00024.18
8.2.140.0090.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00019.77
8.2.110.0030.00721.07
8.2.100.0080.00317.72
8.2.90.0040.00719.08
8.2.80.0080.00318.03
8.2.70.0050.00317.63
8.2.60.0090.00017.80
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0060.00317.95
8.2.20.0000.00817.84
8.2.10.0080.00017.75
8.2.00.0040.00417.66
8.1.280.0070.01425.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.59
8.1.230.0090.00320.89
8.1.220.0040.00417.78
8.1.210.0040.00418.83
8.1.200.0000.00917.23
8.1.190.0050.00317.41
8.1.180.0000.00818.10
8.1.170.0070.00018.74
8.1.160.0070.00018.90
8.1.150.0040.00418.59
8.1.140.0060.00317.31
8.1.130.0000.00717.77
8.1.120.0080.00017.42
8.1.110.0000.00717.41
8.1.100.0040.00417.42
8.1.90.0040.00417.43
8.1.80.0000.00817.32
8.1.70.0030.00317.43
8.1.60.0040.00417.52
8.1.50.0000.00817.43
8.1.40.0040.00417.43
8.1.30.0000.00817.51
8.1.20.0000.00817.64
8.1.10.0040.00417.52
8.1.00.0050.00517.40
8.0.300.0070.00020.02
8.0.290.0040.00416.75
8.0.280.0030.00318.37
8.0.270.0050.00217.27
8.0.260.0000.00718.72
8.0.250.0040.00417.09
8.0.240.0060.00617.03
8.0.230.0050.00317.01
8.0.220.0070.00016.97
8.0.210.0000.00716.93
8.0.200.0040.00416.93
8.0.190.0060.00316.91
8.0.180.0040.00416.96
8.0.170.0040.00716.95
8.0.160.0000.00717.04
8.0.150.0040.00416.95
8.0.140.0040.00716.80
8.0.130.0000.00613.36
8.0.120.0060.00316.89
8.0.110.0040.00416.89
8.0.100.0000.00716.76
8.0.90.0040.00416.88
8.0.80.0140.00716.99
8.0.70.0070.00016.84
8.0.60.0040.00417.01
8.0.50.0040.00417.00
8.0.30.0130.00517.11
8.0.20.0110.01117.22
8.0.10.0000.00717.01
8.0.00.0060.01216.85
7.4.330.0000.00514.70
7.4.320.0040.00416.40
7.4.300.0000.00716.57
7.4.290.0030.00316.60
7.4.280.0100.00016.52
7.4.270.0000.00716.47
7.4.260.0040.00413.23
7.4.250.0040.00416.46
7.4.240.0030.00316.36
7.4.230.0030.00516.47
7.4.220.0150.00616.54
7.4.210.0100.00716.48
7.4.200.0000.00716.57
7.4.190.0070.00016.59
7.4.160.0130.00316.48
7.4.150.0120.00617.07
7.4.140.0070.01117.13
7.4.130.0020.01516.52
7.4.120.0150.00416.37
7.4.110.0150.00916.39
7.4.100.0100.01316.31
7.4.90.0090.01216.52
7.4.80.0030.01218.80
7.4.70.0080.01516.41
7.4.60.0130.00416.32
7.4.50.0040.00416.23
7.4.40.0070.00721.69
7.4.30.0000.01616.30
7.4.10.0100.00714.86
7.4.00.0050.00614.82
7.3.330.0060.00013.43
7.3.320.0050.00013.35
7.3.310.0000.00716.26
7.3.300.0060.00016.23
7.3.290.0020.01316.30
7.3.280.0070.00916.39
7.3.270.0110.00817.07
7.3.260.0050.01218.24
7.3.250.0130.00916.45
7.3.240.0130.00316.46
7.3.230.0120.00816.63
7.3.210.0120.00616.30
7.3.200.0030.01519.39
7.3.190.0060.01216.40
7.3.180.0090.00616.34
7.3.170.0060.00916.32
7.3.160.0040.01116.56
7.3.130.0030.01014.80
7.3.120.0050.01014.98
7.3.110.0030.01614.51
7.3.100.0040.01014.85
7.3.90.0030.00614.50
7.3.80.0000.01114.73
7.3.70.0120.00314.63
7.3.60.0080.00814.89
7.3.50.0100.00314.56
7.3.40.0030.00714.39
7.3.30.0060.00914.85
7.3.20.0100.00716.61
7.3.10.0080.00316.64
7.3.00.0090.00316.66
7.2.330.0140.00416.46
7.2.320.0090.00916.40
7.2.310.0050.01516.72
7.2.300.0130.01016.67
7.2.290.0070.01016.32
7.2.260.0060.00914.81
7.2.250.0080.00814.97
7.2.240.0060.01015.12
7.2.230.0000.01515.27
7.2.220.0000.01515.11
7.2.210.0060.00914.91
7.2.200.0030.00714.91
7.2.190.0060.00914.91
7.2.180.0070.00714.99
7.2.170.0090.00314.66
7.2.160.0070.00314.59
7.2.150.0040.00816.52
7.2.140.0120.00616.82
7.2.130.0090.00616.66
7.2.120.0100.00416.78
7.2.110.0070.00916.90
7.2.100.0070.00916.68
7.2.90.0060.00916.88
7.2.80.0030.01016.90
7.2.70.0070.00716.65
7.2.60.0030.01016.76
7.2.50.0060.00816.78
7.2.40.0050.01016.67
7.2.30.0030.01116.71
7.2.20.0070.00716.68
7.2.10.0040.01116.81
7.2.00.0060.00817.67
7.1.330.0090.00415.84
7.1.320.0040.01115.50
7.1.310.0060.00615.77
7.1.300.0030.01015.39
7.1.290.0060.00315.78
7.1.280.0030.01015.83
7.1.270.0060.00915.64
7.1.260.0060.00615.63
7.1.250.0050.00615.58
7.1.240.0000.01315.66
7.1.230.0040.00415.67
7.1.220.0000.01015.72
7.1.210.0000.01315.81
7.1.200.0110.00115.77
7.1.190.0070.00315.71
7.1.180.0120.00315.74
7.1.170.0120.00315.57
7.1.160.0100.00615.56
7.1.150.0030.01315.82
7.1.140.0100.00015.77
7.1.130.0070.00715.50
7.1.120.0030.01015.49
7.1.110.0040.01115.52
7.1.100.0070.00516.80
7.1.90.0070.01015.70
7.1.80.0100.00315.66
7.1.70.0050.00316.20
7.1.60.0080.00616.27
7.1.50.0030.01516.21
7.1.40.0030.00815.71
7.1.30.0000.01015.41
7.1.20.0060.00315.69
7.1.10.0070.00715.73
7.1.00.0080.03819.02
7.0.330.0040.00815.46
7.0.320.0040.00815.30
7.0.310.0080.00415.41
7.0.300.0000.01315.23
7.0.290.0030.01115.54
7.0.280.0040.01115.12
7.0.270.0000.00915.16
7.0.260.0090.00315.49
7.0.250.0030.00515.10
7.0.240.0110.00415.23
7.0.230.0060.00815.34
7.0.220.0030.00515.31
7.0.210.0030.01015.30
7.0.200.0030.00916.04
7.0.190.0030.01015.22
7.0.180.0030.00915.21
7.0.170.0060.00615.09
7.0.160.0030.00915.33
7.0.150.0070.00315.16
7.0.140.0030.03818.68
7.0.130.0060.00615.55
7.0.120.0020.02218.65
7.0.110.0000.00815.19
7.0.100.0090.00615.08
7.0.90.0090.00615.44
7.0.80.0000.01215.45
7.0.70.0030.01015.43
7.0.60.0020.04017.66
7.0.50.0000.02616.57
7.0.40.0110.04016.55
7.0.30.0170.03116.64
7.0.20.0130.03016.72
7.0.10.0000.04216.76
7.0.00.0050.04816.68
5.6.400.0090.00614.24
5.6.390.0090.00614.37
5.6.380.0030.01213.95
5.6.370.0110.00414.16
5.6.360.0000.01014.08
5.6.350.0030.01014.14
5.6.340.0070.00314.37
5.6.330.0000.00814.59
5.6.320.0130.00314.50
5.6.310.0030.00714.25
5.6.300.0110.00414.23
5.6.290.0000.01014.52
5.6.280.0100.03517.79
5.6.270.0090.00014.18
5.6.260.0040.00814.41
5.6.250.0130.00314.16
5.6.240.0070.01014.14
5.6.230.0000.01014.21
5.6.220.0040.01114.36
5.6.210.0050.03617.31
5.6.200.0040.02116.22
5.6.190.0070.02717.51
5.6.180.0170.02717.35
5.6.170.0170.03217.38
5.6.160.0080.04617.55
5.6.150.0090.02616.30
5.6.140.0020.03716.14
5.6.130.0050.02316.16
5.6.120.0050.03517.53
5.6.110.0030.04217.82
5.6.100.0030.04617.55
5.6.90.0150.03717.73
5.6.80.0060.03017.33
5.6.70.0100.00714.09
5.6.60.0040.00814.22
5.6.50.0080.00414.10
5.6.40.0040.01114.10
5.6.30.0090.00314.11
5.6.20.0040.00814.20
5.6.10.0040.00714.08
5.6.00.0000.00914.43
5.5.380.0080.00414.29
5.5.370.0030.00914.02
5.5.360.0030.00713.94
5.5.350.0030.04217.32
5.5.340.0020.02316.06
5.5.330.0070.02817.06
5.5.320.0750.02517.33
5.5.310.0170.03817.25
5.5.300.0110.04016.00
5.5.290.0000.02816.00
5.5.280.0070.04217.34
5.5.270.0060.04117.40
5.5.260.0080.04317.62
5.5.250.0090.03617.38
5.5.240.0120.02817.22
5.5.230.0000.01414.19
5.5.220.0030.00914.07
5.5.210.0000.01314.20
5.5.200.0070.00714.07
5.5.190.0070.00714.25
5.5.180.0040.00414.06
5.5.170.0060.00614.34
5.5.160.0060.00314.16
5.5.150.0040.00714.06
5.5.140.0040.00813.67
5.5.130.0060.00313.90
5.5.120.0030.00714.38
5.5.110.0090.00314.10
5.5.100.0060.00913.93
5.5.90.0100.00013.92
5.5.80.0090.00614.13
5.5.70.0100.00713.92
5.5.60.0030.00813.83
5.5.50.0030.01014.10
5.5.40.0080.00813.94
5.5.30.0030.01014.26
5.5.20.0110.00314.18
5.5.10.0030.00814.16
5.5.00.0080.00414.16
5.4.450.0380.02615.64
5.4.440.0330.02815.50
5.4.430.0460.02015.41
5.4.420.0410.01615.42
5.4.410.0240.02115.48
5.4.400.0260.02015.48
5.4.390.0300.01815.48
5.4.380.0250.03015.43
5.4.370.0370.01815.38
5.4.360.0370.03015.43
5.4.350.0430.02215.43
5.4.340.0180.02515.32
5.4.330.0030.00611.64
5.4.320.0380.02615.35
5.4.310.0200.02415.34
5.4.300.0300.02515.43
5.4.290.0270.02715.35
5.4.280.0140.03615.23
5.4.270.0320.02015.38
5.4.260.0170.04315.47
5.4.250.0240.02515.34
5.4.240.0390.02315.43
5.4.230.0370.03015.30
5.4.220.0220.02015.32
5.4.210.0360.02115.36
5.4.200.0270.02015.42
5.4.190.0410.01815.47
5.4.180.0400.02215.39
5.4.170.0250.02315.42
5.4.160.0220.02215.29
5.4.150.0270.02515.29
5.4.140.0220.01714.07
5.4.130.0270.02114.17
5.4.120.0290.01814.09
5.4.110.0280.02014.13
5.4.100.0250.02214.00
5.4.90.0430.02013.98
5.4.80.0500.02014.01
5.4.70.0380.02014.09
5.4.60.0250.03814.09
5.4.50.0350.02314.07
5.4.40.0180.02614.10
5.4.30.0340.02114.10
5.4.20.0530.02013.90
5.4.10.0460.01713.98
5.4.00.0270.02113.74
5.3.290.0380.02113.45
5.3.280.0420.02313.45
5.3.270.0200.02613.45
5.3.260.0250.02213.45
5.3.250.0290.01713.45
5.3.240.0170.02513.45
5.3.230.0310.02113.45
5.3.220.0330.02213.45
5.3.210.0100.02713.45
5.3.200.0330.02213.45
5.3.190.0430.02013.45
5.3.180.0200.02313.45
5.3.170.0470.01813.45
5.3.160.0120.02313.45
5.3.150.0350.02413.45
5.3.140.0480.02013.45
5.3.130.0350.02813.44
5.3.120.0100.02713.44
5.3.110.0410.02713.44
5.3.100.0400.02313.44
5.3.90.0230.02213.44
5.3.80.0250.01813.44
5.3.70.0120.02713.44
5.3.60.0250.02013.44
5.3.50.0240.02013.44
5.3.40.0380.02313.44
5.3.30.0320.02613.44
5.3.20.0300.01713.44
5.3.10.0320.01813.44
5.3.00.0200.02213.44
5.2.170.0630.03715.24
5.2.160.0030.02315.24
5.2.150.0670.03315.24
5.2.140.0730.03315.24
5.2.130.0530.03015.24
5.2.120.0070.02015.24
5.2.110.0800.02315.24
5.2.100.0230.03015.24
5.2.90.0430.03315.24
5.2.80.0630.03015.24
5.2.70.0470.03715.24
5.2.60.0400.02715.24
5.2.50.0500.03015.24
5.2.40.0000.02715.24
5.2.30.0330.03015.24
5.2.20.0100.03315.21
5.2.10.0230.05015.24
5.2.00.0170.03015.24
5.1.60.0300.02315.24
5.1.50.0530.02315.24
5.1.40.0370.03015.24
5.1.30.0400.02715.24
5.1.20.0130.03315.24
5.1.10.0470.02015.24
5.1.00.0230.03015.24
5.0.50.0330.02015.24
5.0.40.0100.02015.24
5.0.30.0200.02715.24
5.0.20.0100.02715.24
5.0.10.0300.01715.24
5.0.00.0200.02715.24
4.4.90.0300.01315.24
4.4.80.0170.01315.24
4.4.70.0270.01315.24
4.4.60.0200.01715.24
4.4.50.0300.01015.24
4.4.40.0270.02315.24
4.4.30.0300.01315.24
4.4.20.0270.01315.24
4.4.10.0170.02015.24
4.4.00.0070.02715.24
4.3.110.0400.02015.24
4.3.100.0200.01715.24
4.3.90.0330.01315.24
4.3.80.0270.02315.24
4.3.70.0130.01715.24
4.3.60.0070.01715.24
4.3.50.0170.01715.24
4.3.40.0230.03015.24
4.3.30.0000.02015.24
4.3.20.0000.02015.24
4.3.10.0030.01315.24
4.3.00.0030.01715.24

preferences:
48.72 ms | 401 KiB | 5 Q