3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { public function __construct( $message ) { parent::__construct( $message ); } } class Message { private $text; public function __construct( $text ) { $this->text = $text; } public function __toString() { return $this->text; } } echo (new MyException('blah'))->getMessage(); echo (new MyException( new Message('blah') ))->getMessage();

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.4.120.0120.00920.69
8.4.110.0060.00222.32
8.4.100.0080.00117.71
8.4.90.0050.00418.55
8.4.80.0040.00517.94
8.4.70.0080.01217.88
8.4.60.0100.00919.00
8.4.50.0150.00519.41
8.4.40.0420.01217.55
8.4.30.0340.01317.23
8.4.20.0410.00817.36
8.4.10.0370.01017.30
8.3.250.0110.00818.92
8.3.240.0120.00817.42
8.3.230.0080.00316.74
8.3.220.0120.00517.05
8.3.210.0080.00816.75
8.3.200.0070.00216.55
8.3.190.0120.00716.66
8.3.180.0120.00818.81
8.3.170.0460.00616.58
8.3.160.0440.00916.31
8.3.150.0380.00816.75
8.3.140.0380.00916.27
8.3.130.0220.00516.80
8.3.120.0200.00716.31
8.3.110.0240.00716.21
8.3.100.0370.00916.51
8.3.90.0350.00716.26
8.3.80.0360.00816.46
8.3.70.0350.01016.44
8.3.60.0380.00816.50
8.3.50.0380.00816.36
8.3.40.0220.00417.55
8.3.30.0320.00917.54
8.3.20.0300.00917.71
8.3.10.0360.00917.48
8.3.00.0140.00717.47
8.2.290.0090.00920.75
8.2.280.0120.00720.79
8.2.270.0310.00716.74
8.2.260.0300.00916.59
8.2.250.0340.00816.41
8.2.240.0300.00716.25
8.2.230.0320.00616.56
8.2.220.0320.00816.48
8.2.210.0270.00516.08
8.2.200.0260.00916.58
8.2.190.0270.00916.66
8.2.180.0250.01316.34
8.2.170.0330.00917.58
8.2.160.0380.00617.45
8.2.150.0450.01317.76
8.2.140.0270.01217.51
8.2.130.0330.00817.47
8.2.120.0330.00917.43
8.2.110.0340.00717.34
8.2.100.0290.01117.59
8.2.90.0310.00517.48
8.2.80.0320.00817.36
8.2.70.0290.00817.46
8.2.60.0280.01217.46
8.2.50.0340.00517.59
8.2.40.0310.00617.25
8.2.30.0310.00717.39
8.2.20.0320.00617.64
8.2.10.0310.00617.40
8.2.00.0270.01017.19
8.1.330.0100.00821.79
8.1.320.0110.00821.82
8.1.310.0300.00916.12
8.1.300.0340.00516.04
8.1.290.0300.00816.05
8.1.280.0360.01015.92
8.1.270.0550.00717.34
8.1.260.0290.00817.02
8.1.250.0290.00817.26
8.1.240.0270.00917.20
8.1.230.0300.01017.20
8.1.220.0280.00917.17
8.1.210.0280.00817.15
8.1.200.0260.01017.32
8.1.190.0320.00717.05
8.1.180.0370.00616.95
8.1.170.0250.01117.24
8.1.160.0290.00717.19
8.1.150.0310.00517.06
8.1.140.0290.00717.09
8.1.130.0300.00617.23
8.1.120.0260.01017.23
8.1.110.0260.00717.27
8.1.100.0270.00917.27
8.1.90.0240.01217.05
8.1.80.0310.00617.27
8.1.70.0270.00817.27
8.1.60.0290.00717.11
8.1.50.0270.00717.11
8.1.40.0240.00717.30
8.1.30.0330.00517.36
8.1.20.0280.00917.34
8.1.10.0290.00717.46
8.1.00.0280.00817.13
8.0.300.0280.00816.52
8.0.290.0300.00516.61
8.0.280.0300.00616.37
8.0.270.0400.00716.46
8.0.260.0310.01016.43
8.0.250.0320.00416.09
8.0.240.0280.00916.21
8.0.230.0300.00616.50
8.0.220.0270.01016.43
8.0.210.0320.00516.29
8.0.200.0280.00816.25
8.0.190.0290.00816.50
8.0.180.0330.00916.20
8.0.170.0270.00716.48
8.0.160.0300.00716.25
8.0.150.0240.00616.54
8.0.140.0280.00816.47
8.0.130.0310.00616.38
8.0.120.0280.00816.31
8.0.110.0260.00716.38
8.0.100.0290.00416.37
8.0.90.0260.00816.23
8.0.80.0250.01216.44
8.0.70.0310.00616.49
8.0.60.0310.00516.52
8.0.50.0300.00716.44
8.0.30.0320.00516.34
8.0.20.0280.00816.68
8.0.10.0270.00816.51
8.0.00.0320.00616.50
7.4.330.0370.00416.11
7.4.320.0390.00715.96
7.4.300.0280.00616.11
7.4.290.0250.00816.34
7.4.280.0340.00616.25
7.4.270.0290.00416.14
7.4.260.0290.00416.13
7.4.250.0240.00916.29
7.4.240.0250.00816.22
7.4.230.0270.00616.30
7.4.220.0230.00816.28
7.4.210.0210.00916.00
7.4.200.0260.00416.11
7.4.190.0230.01116.25
7.4.180.0310.00316.11
7.4.160.0280.00516.30
7.4.150.0240.00616.30
7.4.140.0250.01116.08
7.4.130.0270.00616.29
7.4.120.0230.00816.24
7.4.110.0290.00816.03
7.4.100.0300.00416.23
7.4.90.0230.00716.23
7.4.80.0180.00316.17
7.4.70.0130.00216.34
7.4.60.0270.00716.17
7.4.50.0260.00816.15
7.4.40.0220.00516.19
7.4.30.0310.00615.95
7.4.20.0250.01115.98
7.4.10.0300.00316.09
7.4.00.0270.00816.25
7.3.330.0300.00816.04
7.3.320.0250.00816.01
7.3.310.0380.00815.81
7.3.300.0270.01215.80
7.3.290.0300.00615.80
7.3.280.0290.00415.81
7.3.270.0320.00715.96
7.3.260.0290.00715.60
7.3.250.0260.00616.06
7.3.240.0240.00915.64
7.3.230.0250.00815.90
7.3.220.0250.00915.94
7.3.210.0260.00916.22
7.3.200.0250.00915.91
7.3.190.0270.00815.88
7.3.180.0310.00416.04
7.3.170.0300.00515.82
7.3.160.0240.00715.90
7.3.150.0270.00715.95
7.3.140.0280.00616.09
7.3.130.0230.00815.94
7.3.120.0250.00615.90
7.3.110.0220.01115.82
7.3.100.0280.00216.01
7.3.90.0250.00516.20
7.3.80.0210.01016.16
7.3.70.0250.00816.06
7.3.60.0310.00515.91
7.3.50.0180.00416.47
7.3.40.0150.00616.15
7.3.30.0290.00615.96
7.3.20.0340.00618.02
7.3.10.0250.00917.75
7.3.00.0280.00817.51
7.2.340.0260.00616.30
7.2.330.0330.00916.33
7.2.320.0330.00616.01
7.2.310.0220.01016.28
7.2.300.0230.00916.15
7.2.290.0340.00416.11
7.2.280.0250.00715.91
7.2.270.0220.01016.40
7.2.260.0250.00816.18
7.2.250.0240.01015.97
7.2.240.0120.00316.20
7.2.230.0220.00616.11
7.2.220.0250.00815.93
7.2.210.0210.00616.00
7.2.200.0250.00816.15
7.2.190.0210.00816.32
7.2.180.0280.00515.98
7.2.170.0260.00716.40
7.2.160.0220.00616.45
7.2.150.0310.00818.09
7.2.140.0210.00418.05
7.2.130.0220.01118.20
7.2.120.0250.01018.14
7.2.110.0280.00518.09
7.2.100.0280.00418.20
7.2.90.0280.00718.13
7.2.80.0220.01018.16
7.2.70.0210.00918.33
7.2.60.0200.00718.17
7.2.50.0280.00518.36
7.2.40.0260.00818.19
7.2.30.0230.00918.34
7.2.20.0300.00918.06
7.2.10.0290.00717.88
7.2.00.0290.00518.35
7.1.330.0210.00916.98
7.1.320.0230.00516.99
7.1.310.0260.00616.90
7.1.300.0250.00416.97
7.1.290.0230.00717.05
7.1.280.0240.00916.96
7.1.270.0210.00817.02
7.1.260.0230.00617.26
7.1.250.0230.00616.92
7.1.240.0290.00416.86
7.1.230.0200.01017.26
7.1.220.0210.00817.05
7.1.210.0270.00517.16
7.1.200.0210.00717.06
7.1.190.0220.00717.02
7.1.180.0210.00916.78
7.1.170.0230.01017.06
7.1.160.0240.00617.03
7.1.150.0210.00817.00
7.1.140.0240.00816.85
7.1.130.0300.00716.71
7.1.120.0330.00716.74
7.1.110.0290.00717.00
7.1.100.0200.01016.83
7.1.90.0250.00416.89
7.1.80.0190.00716.97
7.1.70.0210.00316.92
7.1.60.0200.00916.89
7.1.50.0240.00517.12
7.1.40.0250.00517.10
7.1.30.0190.00916.99
7.1.20.0200.00916.82
7.1.10.0180.01116.80
7.1.00.0260.00517.04
7.0.330.0210.00916.73
7.0.320.0230.00716.72
7.0.310.0260.00816.50
7.0.300.0210.00817.04
7.0.290.0210.00716.95
7.0.280.0260.00716.72
7.0.270.0260.00616.74
7.0.260.0190.00816.64
7.0.250.0250.00616.73
7.0.240.0210.00717.19
7.0.230.0210.00417.09
7.0.220.0140.00416.95
7.0.210.0130.00317.07
7.0.200.0090.00417.03
7.0.190.0220.00616.77
7.0.180.0220.00716.82
7.0.170.0260.00516.91
7.0.160.0220.00716.55
7.0.150.0220.00616.77
7.0.140.0270.00616.85
7.0.130.0180.01017.04
7.0.120.0220.00616.91
7.0.110.0190.00416.96
7.0.100.0230.00416.84
7.0.90.0270.00516.57
7.0.80.0240.00516.75
7.0.70.0230.00516.64
7.0.60.0240.00516.86
7.0.50.0260.00616.65
7.0.40.0400.00416.68
7.0.30.0260.00716.69
7.0.20.0210.00816.50
7.0.10.0220.00616.52
7.0.00.0250.00416.73
5.6.400.0240.00515.63
5.6.390.0250.00515.84
5.6.380.0260.00415.51
5.6.370.0240.00515.71
5.6.360.0230.00715.74
5.6.350.0250.00515.82
5.6.340.0200.00515.53
5.6.330.0130.00215.46
5.6.320.0190.00515.61
5.6.310.0190.01015.50
5.6.300.0240.00515.41
5.6.290.0210.00815.79
5.6.280.0230.00815.48
5.6.270.0230.00715.56
5.6.260.0230.00715.55
5.6.250.0220.00715.52
5.6.240.0260.00715.60
5.6.230.0200.00515.78
5.6.220.0250.00515.73
5.6.210.0210.00815.62
5.6.200.0230.00715.70
5.6.190.0220.00715.64
5.6.180.0260.00315.85
5.6.170.0190.01015.68
5.6.160.0230.00615.79
5.6.150.0220.00715.63
5.6.140.0230.00815.64
5.6.130.0230.00615.51
5.6.120.0220.00715.49
5.6.110.0190.01015.25
5.6.100.0240.00515.60
5.6.90.0210.00815.25
5.6.80.0220.00715.36
5.6.70.0230.00615.77
5.6.60.0250.00415.68
5.6.50.0250.00515.54
5.6.40.0250.00415.46
5.6.30.0350.00615.47
5.6.20.0280.00815.39
5.6.10.0220.00515.77
5.6.00.0240.00315.48
5.5.380.0250.00415.55
5.5.370.0210.00715.34
5.5.360.0210.00815.43
5.5.350.0220.00715.69
5.5.340.0160.00715.55
5.5.330.0240.00615.55
5.5.320.0230.00715.74
5.5.310.0200.00915.71
5.5.300.0210.00815.43
5.5.290.0260.00415.34
5.5.280.0210.00815.65
5.5.270.0190.01015.56
5.5.260.0220.00715.52
5.5.250.0230.00615.48
5.5.240.0210.00815.72
5.5.230.0190.00915.64
5.5.220.0210.00615.65
5.5.210.0170.01215.51
5.5.200.0220.00415.76
5.5.190.0200.00915.29
5.5.180.0250.00715.52
5.5.170.0260.00215.38
5.5.160.0210.00815.53
5.5.150.0220.00615.13
5.5.140.0220.00615.16
5.5.130.0230.00515.32
5.5.120.0200.00515.21
5.5.110.0150.00715.30
5.5.100.0130.00515.81
5.5.90.0260.00515.60
5.5.80.0190.00615.43
5.5.70.0220.00515.58
5.5.60.0240.00415.76
5.5.50.0230.00415.72
5.5.40.0200.00815.59
5.5.30.0200.00715.78
5.5.20.0220.00815.61
5.5.10.0250.00515.59
5.5.00.0230.00815.70
5.4.450.0170.00514.05
5.4.440.0260.00314.05
5.4.430.0190.00514.05
5.4.420.0230.00214.05
5.4.410.0180.00614.05
5.4.400.0160.00314.05
5.4.390.0170.00514.05
5.4.380.0150.00614.05
5.4.370.0170.00614.05
5.4.360.0180.00514.05
5.4.350.0170.00514.05
5.4.340.0190.00414.05
5.4.330.0170.00514.05
5.4.320.0190.00314.05
5.4.310.0190.00414.05
5.4.300.0170.00614.05
5.4.290.0180.00414.05
5.4.280.0160.00314.05
5.4.270.0200.00214.05
5.4.260.0180.00514.05
5.4.250.0180.00514.05
5.4.240.0190.00514.05
5.4.230.0160.00814.05
5.4.220.0170.00714.05
5.4.210.0180.00414.05
5.4.200.0160.00514.05
5.4.190.0140.00814.05
5.4.180.0180.00514.05
5.4.170.0150.00714.05
5.4.160.0160.00514.05
5.4.150.0150.00414.05
5.4.140.0160.00514.05
5.4.130.0200.00214.05
5.4.120.0150.00714.05
5.4.110.0180.00414.05
5.4.100.0200.00314.05
5.4.90.0170.00114.05
5.4.80.0060.00414.05
5.4.70.0070.00314.05
5.4.60.0090.00214.05
5.4.50.0140.00514.05
5.4.40.0090.00214.05
5.4.30.0070.00314.05
5.4.20.0170.00414.05
5.4.10.0120.00714.05
5.4.00.0130.00614.05
5.3.290.0160.00214.05
5.3.280.0060.00414.05
5.3.270.0160.00614.05
5.3.260.0160.00714.05
5.3.250.0150.00714.05
5.3.240.0230.00514.05
5.3.230.0140.00414.05
5.3.220.0140.00614.05
5.3.210.0060.00414.05
5.3.200.0140.00814.05
5.3.190.0170.00414.05
5.3.180.0180.00014.05
5.3.170.0140.00214.05
5.3.160.0070.00414.05
5.3.150.0110.00414.05
5.3.140.0180.00414.05
5.3.130.0210.00314.05
5.3.120.0150.00714.05
5.3.110.0190.00414.05
5.3.100.0200.00214.05
5.3.90.0160.00514.05
5.3.80.0140.00814.05
5.3.70.0170.00514.05
5.3.60.0170.00514.05
5.3.50.0180.01114.05
5.3.40.0180.00714.05
5.3.30.0160.00514.05
5.3.20.0170.00514.05
5.3.10.0170.00514.05
5.3.00.0140.00714.05
5.2.170.0130.00514.05
5.2.160.0160.00314.05
5.2.150.0120.00614.05
5.2.140.0130.00514.05
5.2.130.0130.00614.05
5.2.120.0150.00614.05
5.2.110.0140.00514.05
5.2.100.0140.00514.05
5.2.90.0150.00314.05
5.2.80.0120.00614.05
5.2.70.0130.00614.05
5.2.60.0140.00514.05
5.2.50.0160.00314.05
5.2.40.0090.00914.05
5.2.30.0130.00514.05
5.2.20.0140.00414.05
5.2.10.0120.00514.05
5.2.00.0110.00514.05
5.1.60.0130.00514.05
5.1.50.0120.00414.05
5.1.40.0150.00314.05
5.1.30.0150.00214.05
5.1.20.0130.00414.05
5.1.10.0110.00614.05
5.1.00.0160.00314.05
5.0.50.0110.00314.05
5.0.40.0130.00114.05
5.0.30.0090.00514.05
5.0.20.0130.00114.05
5.0.10.0080.00714.05
5.0.00.0080.00514.05
4.4.90.0050.00114.05
4.4.80.0050.00214.05
4.4.70.0070.00114.05
4.4.60.0070.00114.05
4.4.50.0060.00214.05
4.4.40.0080.00014.05
4.4.30.0050.00314.05
4.4.20.0060.00214.05
4.4.10.0070.00114.05
4.4.00.0070.00114.05
4.3.110.0060.00214.05
4.3.100.0070.00214.05
4.3.90.0090.00014.05
4.3.80.0070.00114.05
4.3.70.0070.00114.05
4.3.60.0070.00114.05
4.3.50.0060.00214.05
4.3.40.0070.00114.05
4.3.30.0050.00114.05
4.3.20.0040.00214.05
4.3.10.0050.00114.05
4.3.00.0040.00214.05

preferences:
29.81 ms | 403 KiB | 5 Q