3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ToStringTest { function toString() { echo 'toString'; throw new Exception('error'); } function __toString() { try { $this->toString(); } catch (\Exception $e) { echo 'hey, this is not cool'; } } } $test = new ToStringTest; $test = (string) $test;

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.0140.00716.60
8.3.50.0070.01021.05
8.3.40.0140.00718.80
8.3.30.0060.01218.71
8.3.20.0000.00820.24
8.3.10.0050.00523.33
8.3.00.0070.00023.64
8.2.180.0110.00416.75
8.2.170.0040.01122.96
8.2.160.0110.00622.13
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00017.88
8.2.110.0040.00420.93
8.2.100.0070.00417.72
8.2.90.0070.00319.22
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00421.04
8.2.30.0090.00017.94
8.2.20.0040.00417.74
8.2.10.0040.00418.04
8.2.00.0030.00518.05
8.1.280.0030.01025.92
8.1.270.0040.00420.24
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00019.44
8.1.230.0090.00317.42
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0040.00418.63
8.1.160.0040.00422.02
8.1.150.0050.00218.81
8.1.140.0020.00517.45
8.1.130.0040.00417.57
8.1.120.0000.00717.51
8.1.110.0040.00417.36
8.1.100.0030.00317.50
8.1.90.0000.00717.45
8.1.80.0080.00017.33
8.1.70.0000.00717.35
8.1.60.0070.00017.55
8.1.50.0030.00917.52
8.1.40.0040.00417.50
8.1.30.0090.00017.67
8.1.20.0000.00717.53
8.1.10.0000.00717.55
8.1.00.0040.00417.40
8.0.300.0000.00818.77
8.0.290.0080.00016.73
8.0.280.0040.00418.44
8.0.270.0000.00717.20
8.0.260.0040.00418.43
8.0.250.0040.00416.95
8.0.240.0030.00316.98
8.0.230.0070.00016.99
8.0.220.0000.00716.98
8.0.210.0050.00316.85
8.0.200.0030.00316.98
8.0.190.0000.00816.92
8.0.180.0000.00716.95
8.0.170.0000.00816.97
8.0.160.0050.00217.01
8.0.150.0030.00316.85
8.0.140.0080.00016.93
8.0.130.0030.00513.42
8.0.120.0040.00416.86
8.0.110.0040.00417.00
8.0.100.0000.00816.92
8.0.90.0050.00216.87
8.0.80.0060.00916.95
8.0.70.0000.00816.76
8.0.60.0040.00416.78
8.0.50.0080.00016.95
8.0.30.0140.00717.08
8.0.20.0100.00917.40
8.0.10.0000.00816.97
8.0.00.0110.00716.78
7.4.330.0050.00015.08
7.4.320.0030.00316.65
7.4.300.0000.00616.59
7.4.290.0040.00416.60
7.4.280.0060.00316.55
7.4.270.0030.00316.52
7.4.260.0030.00316.58
7.4.250.0000.00716.53
7.4.240.0040.00316.44
7.4.230.0050.00316.54
7.4.220.0110.00616.44
7.4.210.0060.01316.54
7.4.200.0080.00016.60
7.4.160.0060.00916.46
7.4.150.0040.01417.40
7.4.140.0080.01117.86
7.4.130.0160.00316.63
7.4.120.0110.00816.48
7.4.110.0030.01416.61
7.4.100.0150.00916.62
7.4.90.0090.00916.70
7.4.80.0130.00419.39
7.4.70.0060.00916.66
7.4.60.0080.00816.48
7.4.50.0000.00816.46
7.4.40.0200.00316.50
7.4.30.0070.01416.34
7.4.00.0070.01015.00
7.3.330.0050.00013.35
7.3.320.0000.00613.35
7.3.310.0070.00016.21
7.3.300.0070.00016.40
7.3.290.0080.00916.30
7.3.280.0090.01116.37
7.3.270.0120.00417.40
7.3.260.0130.00416.38
7.3.250.0080.01016.49
7.3.240.0140.00316.41
7.3.230.0130.01316.39
7.3.210.0070.01016.42
7.3.200.0060.01016.28
7.3.190.0110.01116.50
7.3.180.0200.02916.59
7.3.170.0100.00716.45
7.3.160.0040.01316.48
7.3.120.0020.01614.74
7.3.110.0080.00814.78
7.3.100.0090.00614.61
7.3.90.0060.01214.97
7.3.80.0060.00814.77
7.3.70.0050.01014.82
7.3.60.0090.00314.89
7.3.50.0060.00814.80
7.3.40.0090.00414.78
7.3.30.0070.00414.75
7.3.20.0100.00316.81
7.3.10.0110.00316.77
7.3.00.0120.00316.62
7.2.330.0060.01216.68
7.2.320.0120.01216.69
7.2.310.0000.01616.69
7.2.300.0130.00316.48
7.2.290.0080.00816.73
7.2.250.0090.01114.96
7.2.240.0060.01415.21
7.2.230.0070.01015.08
7.2.220.0040.01115.01
7.2.210.0060.01015.07
7.2.200.0060.01115.18
7.2.190.0060.00815.16
7.2.180.0090.00715.00
7.2.170.0080.00915.07
7.2.60.0040.01216.93
7.2.00.0030.00919.13
7.1.330.0060.00715.57
7.1.320.0080.00515.62
7.1.310.0080.00915.65
7.1.300.0050.01115.72
7.1.290.0030.01015.65
7.1.280.0050.01215.71
7.1.270.0040.01115.81
7.1.260.0060.01015.77
7.1.200.0000.01415.70
7.1.100.0100.00318.23
7.1.70.0030.00916.74
7.1.60.0070.01619.18
7.1.50.0040.02116.57
7.1.00.0100.07722.44
7.0.200.0160.01016.52
7.0.60.0130.05720.04
7.0.50.0100.06317.95
7.0.40.0030.08320.04
7.0.30.0100.05320.26
7.0.20.0400.07020.33
7.0.10.0030.04320.16
7.0.00.0100.08020.20
5.6.280.0000.08321.08
5.6.210.0030.04720.53
5.6.200.0030.07718.19
5.6.190.0070.04320.77
5.6.180.0430.06720.60
5.6.170.0270.04020.44
5.6.160.0100.08020.54
5.6.150.0070.03718.15
5.6.140.0100.07718.17
5.6.130.0200.05018.14
5.6.120.0070.05321.09
5.6.110.0070.07721.01
5.6.100.0100.08020.99
5.6.90.0130.08021.00
5.6.80.0130.08020.39
5.5.350.0200.05020.32
5.5.340.0030.06718.01
5.5.330.0000.09720.46
5.5.320.0370.04320.25
5.5.310.0370.07720.36
5.5.300.0070.04718.07
5.5.290.0000.04317.97
5.5.280.0070.06320.80
5.5.270.0100.08020.83
5.5.260.0030.04720.86
5.5.250.0130.06320.55
5.5.240.0000.07020.23
5.4.450.0730.05019.57
5.4.440.0270.06319.54
5.4.430.0630.06019.27
5.4.420.0300.06719.28
5.4.410.0470.05719.34
5.4.400.0600.06319.23
5.4.390.0530.06019.03
5.4.380.0500.06319.24
5.4.370.0570.06319.35
5.4.360.0570.06319.30
5.4.350.0800.05718.96
5.4.340.0630.06019.30
5.4.320.0470.06719.21
5.4.310.0500.06019.23
5.4.300.0570.05719.05
5.4.290.0570.05019.21
5.4.280.0700.06319.21
5.4.270.0730.04019.22
5.4.260.0630.06318.97
5.4.250.0500.05719.29
5.4.240.0500.07019.32
5.4.230.0630.05719.22
5.4.220.0500.06019.00
5.4.210.0570.06319.09
5.4.200.0470.05016.81
5.4.190.0600.05319.02
5.4.180.0400.07019.09
5.4.170.0600.06318.88
5.4.160.0700.05719.16
5.4.150.0730.06019.07
5.4.140.0700.05016.69
5.4.130.0830.05016.56
5.4.120.0370.06716.40
5.4.110.0530.07016.35
5.4.100.0730.06316.73
5.4.90.0530.05716.38
5.4.80.0600.04716.39
5.4.70.0570.05316.38
5.4.60.0700.04016.31
5.4.50.0570.06316.36
5.4.40.0630.07016.37
5.4.30.0530.06016.30
5.4.20.0530.06016.37
5.4.10.0570.06016.39
5.4.00.0500.05715.96
5.3.290.0630.06314.95
5.3.280.0800.05314.56
5.3.270.0600.05314.75
5.3.260.0630.05314.89
5.3.250.0470.06714.66
5.3.240.0700.04714.57
5.3.230.0630.05014.71
5.3.220.0630.05714.65
5.3.210.0500.06714.70
5.3.200.0530.06314.54
5.3.190.0600.06714.49
5.3.180.0700.05014.62
5.3.170.0700.05314.49
5.3.160.0770.04714.64
5.3.150.0900.04714.68
5.3.140.0670.05314.54
5.3.130.0600.05314.53
5.3.120.0630.06314.70
5.3.110.0630.06014.52
5.3.100.0570.06314.00
5.3.90.0400.06014.06
5.3.80.0570.05014.14
5.3.70.0630.05714.00
5.3.60.0800.05314.09
5.3.50.0630.04714.04
5.3.40.0700.04314.07
5.3.30.0530.04014.20
5.3.20.0430.06013.83
5.3.10.0600.06013.95
5.3.00.0600.05313.57
5.2.170.0630.04711.30
5.2.160.0500.04311.38
5.2.150.0630.06711.16
5.2.140.0530.05311.06
5.2.130.0500.04711.17
5.2.120.0570.06311.11
5.2.110.0530.04011.01
5.2.100.0430.05311.01
5.2.90.0500.05011.01
5.2.80.0500.05311.11
5.2.70.0530.05011.02
5.2.60.0600.04710.96
5.2.50.0600.04011.03
5.2.40.0370.05311.05
5.2.30.0530.03311.20
5.2.20.0330.04310.99
5.2.10.0270.04010.84
5.2.00.0430.03710.86
5.1.60.0630.03710.08
5.1.50.0430.03310.08
5.1.40.0500.03310.23
5.1.30.0370.04010.48
5.1.20.0370.03710.51
5.1.10.0370.04710.13
5.1.00.0430.0379.96
5.0.50.0230.0378.63
5.0.40.0300.0178.55
5.0.30.0230.0508.55
5.0.20.0200.0378.55
5.0.10.0270.0378.55
5.0.00.0300.0508.55
4.4.90.0200.0308.55
4.4.80.0170.0208.55
4.4.70.0200.0208.55
4.4.60.0230.0308.55
4.4.50.0270.0278.55
4.4.40.0300.0378.55
4.4.30.0230.0208.55
4.4.20.0070.0308.55
4.4.10.0230.0178.55
4.4.00.0170.0438.55
4.3.110.0200.0278.55
4.3.100.0070.0338.55
4.3.90.0200.0238.55
4.3.80.0230.0338.55
4.3.70.0170.0178.55
4.3.60.0200.0178.55
4.3.50.0100.0278.55
4.3.40.0130.0378.55
4.3.30.0170.0178.55
4.3.20.0070.0278.55
4.3.10.0030.0278.55
4.3.00.0130.0207.08

preferences:
44.23 ms | 401 KiB | 5 Q