3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ContextException extends Exception { protected $context = array(); public function __construct($message='', $context=array(), $code=0) { $this->context = $context; parent::__construct($message, $code); } /** * Returns an array of variables that existed when exception occured. * @return array Array of variable name=>value pairs. */ public function getContext(){ return $this->context; } } $cheese = true; throw new ContextException('Something went wrong.', get_defined_vars(), E_NOTICE);

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.0100.01016.61
8.3.50.0220.00917.47
8.3.40.0070.01318.97
8.3.30.0070.00718.96
8.3.20.0030.01318.73
8.3.10.0060.00320.69
8.3.00.0060.00619.51
8.2.180.0030.01716.75
8.2.170.0040.01122.96
8.2.160.0100.01020.70
8.2.150.0040.00425.66
8.2.140.0090.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00320.49
8.2.110.0040.00421.06
8.2.100.0070.00417.78
8.2.90.0090.00018.09
8.2.80.0000.00918.09
8.2.70.0090.00317.63
8.2.60.0030.00617.50
8.2.50.0040.00417.50
8.2.40.0060.00319.48
8.2.30.0100.00017.98
8.2.20.0040.00419.28
8.2.10.0000.00817.69
8.2.00.0040.00417.71
8.1.280.0100.00725.92
8.1.270.0000.00824.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.50
8.1.230.0080.00320.90
8.1.220.0050.00317.76
8.1.210.0050.00618.77
8.1.200.0050.00317.35
8.1.190.0000.01217.25
8.1.180.0080.00018.10
8.1.170.0050.00317.62
8.1.160.0040.00418.76
8.1.150.0000.00818.69
8.1.140.0040.00417.45
8.1.130.0000.00717.76
8.1.120.0060.00317.46
8.1.110.0040.00417.43
8.1.100.0000.00717.46
8.1.90.0040.00317.38
8.1.80.0000.00717.45
8.1.70.0000.00717.43
8.1.60.0030.00617.57
8.1.50.0040.00417.47
8.1.40.0080.00017.54
8.1.30.0030.00517.68
8.1.20.0040.00417.63
8.1.10.0070.00017.57
8.1.00.0030.00517.47
8.0.300.0040.00419.88
8.0.290.0000.00716.75
8.0.280.0070.00018.37
8.0.270.0030.00317.19
8.0.260.0030.00316.86
8.0.250.0050.00216.99
8.0.240.0040.00416.95
8.0.230.0070.00016.96
8.0.220.0080.00016.77
8.0.210.0000.00716.95
8.0.200.0000.00716.94
8.0.190.0040.00416.96
8.0.180.0040.00416.80
8.0.170.0030.00516.81
8.0.160.0000.00716.96
8.0.150.0000.00816.92
8.0.140.0000.01016.80
8.0.130.0050.00013.30
8.0.120.0030.00616.88
8.0.110.0040.00416.80
8.0.100.0030.00616.82
8.0.90.0000.00716.91
8.0.80.0040.01216.84
8.0.70.0040.00416.77
8.0.60.0000.00716.91
8.0.50.0040.00416.94
8.0.30.0090.00917.22
8.0.20.0180.01117.21
8.0.10.0040.00417.08
8.0.00.0080.01016.70
7.4.330.0050.00013.00
7.4.320.0050.00216.61
7.4.300.0040.00416.65
7.4.290.0060.00016.48
7.4.280.0000.00716.43
7.4.270.0060.00016.44
7.4.260.0050.00013.26
7.4.250.0000.00716.60
7.4.240.0050.00216.61
7.4.230.0040.00416.32
7.4.220.0070.01116.38
7.4.210.0100.01016.43
7.4.200.0040.00416.34
7.4.190.0040.00416.65
7.4.160.0180.00016.63
7.4.150.0080.01116.56
7.4.140.0030.01416.49
7.4.130.0090.01516.69
7.4.120.0140.00316.63
7.4.110.0160.00716.56
7.4.100.0100.00716.64
7.4.90.0110.00716.40
7.4.80.0030.01316.48
7.4.70.0100.00716.57
7.4.60.0090.00616.54
7.4.50.0050.00016.54
7.4.40.0080.00316.32
7.4.30.0080.01516.48
7.4.00.0030.00714.98
7.3.330.0060.00013.36
7.3.320.0030.00313.35
7.3.310.0070.00016.41
7.3.300.0030.00316.33
7.3.290.0070.00916.36
7.3.280.0110.00516.32
7.3.270.0130.01016.57
7.3.260.0100.01016.27
7.3.250.0130.00816.45
7.3.240.0060.01116.53
7.3.230.0080.00816.48
7.3.210.0180.00316.56
7.3.200.0160.00619.39
7.3.190.0120.00616.51
7.3.180.0090.00616.29
7.3.170.0120.00616.42
7.3.160.0130.00316.50
7.3.120.0040.00714.97
7.2.330.0070.01116.44
7.2.320.0170.00416.74
7.2.310.0000.01716.74
7.2.300.0090.00916.65
7.2.290.0140.00316.48
7.2.60.0030.01316.89
7.2.00.0090.00319.55
7.1.200.0040.01115.62
7.1.100.0000.00918.29
7.1.70.0040.00416.87
7.1.60.0060.01619.31
7.1.50.0000.01117.02
7.1.00.0030.06322.33
7.0.200.0000.00816.75
7.0.140.0000.08022.00
7.0.120.0100.07021.96
7.0.60.0070.08319.93
7.0.50.0030.04017.90
7.0.40.0130.07720.13
7.0.30.0470.07020.23
7.0.20.0300.04320.12
7.0.10.0200.05720.11
7.0.00.0200.07320.15
5.6.280.0100.06721.04
5.6.210.0230.07320.51
5.6.200.0100.07318.18
5.6.190.0070.05320.39
5.6.180.0300.04020.36
5.6.170.0230.08020.58
5.6.160.0100.04020.61
5.6.150.0070.05018.23
5.6.140.0070.04318.32
5.6.130.0030.08018.20
5.6.120.0030.04321.10
5.6.110.0030.09021.02
5.6.100.0100.05321.03
5.6.90.0030.09020.93
5.6.80.0100.08020.38
5.6.70.0400.05020.36
5.5.350.0300.07020.38
5.5.340.0130.05017.98
5.5.330.0030.04720.27
5.5.320.0200.04320.43
5.5.310.0370.06320.28
5.5.300.0100.08018.04
5.5.290.0070.05317.95
5.5.280.0130.06720.77
5.5.270.0070.04720.80
5.5.260.0200.07720.88
5.5.250.0130.07720.69
5.5.240.0030.03720.19
5.4.450.0070.04019.41
5.4.440.0000.04319.48
5.4.430.0000.04019.17
5.4.420.0000.04019.33
5.4.410.0000.04019.44
5.4.400.0130.03319.16
5.4.390.0100.04718.98
5.4.380.0000.04019.16
5.4.370.0070.03719.25
5.4.360.0030.03718.89
5.4.350.0030.04019.15
5.4.340.0070.03719.23
5.4.320.0000.04018.92
5.4.310.0000.04318.85
5.4.300.0030.03719.14
5.4.290.0030.03718.91
5.4.280.0030.03718.91
5.4.270.0100.07018.85
5.4.260.0070.03719.08
5.4.250.0070.05319.15
5.4.240.0070.07719.14
5.4.230.0030.07319.24
5.4.220.0030.04319.24
5.4.210.0070.04719.14
5.4.200.0000.04019.14
5.4.190.0070.04719.23
5.4.180.0170.06319.07
5.4.170.0130.07319.23
5.4.160.0130.05719.21
5.4.150.0070.04318.82
5.4.140.0100.06716.43
5.4.130.0070.07716.37
5.4.120.0100.06716.46
5.4.110.0070.07316.45
5.4.100.0100.07316.33
5.4.90.0000.06316.30
5.4.80.0100.06316.38
5.4.70.0200.05016.65
5.4.60.0030.05316.40
5.4.50.0030.06316.36
5.4.40.0100.07016.43
5.4.30.0030.03716.38
5.4.20.0070.04716.50
5.4.10.0000.08016.50
5.4.00.0070.03715.91
5.3.290.0100.03014.68
5.3.280.0070.07014.65
5.3.270.0030.07714.67
5.3.260.0030.08014.65
5.3.250.0100.07314.61
5.3.240.0030.05314.67
5.3.230.0100.07714.75
5.3.220.0100.05014.58
5.3.210.0030.05014.61
5.3.200.0070.07714.65
5.3.190.0070.03714.58
5.3.180.0030.08314.58
5.3.170.0070.04014.59
5.3.160.0030.08314.61
5.3.150.0100.07014.59
5.3.140.0000.05014.60
5.3.130.0070.04714.56
5.3.120.0130.07714.57
5.3.110.0030.08014.47
5.3.100.0100.07014.03
5.3.90.0070.04314.08
5.3.80.0100.07013.97
5.3.70.0100.04014.07
5.3.60.0030.03713.98
5.3.50.0100.08013.96
5.3.40.0170.06313.97
5.3.30.0070.07313.95
5.3.20.0070.05713.71
5.3.10.0030.05013.81
5.3.00.0070.03313.66
5.2.170.0000.06711.10
5.2.160.0070.05011.30
5.2.150.0030.06711.07
5.2.140.0070.04011.30
5.2.130.0030.05011.00
5.2.120.0130.03711.29
5.2.110.0000.03311.12
5.2.100.0030.03011.16
5.2.90.0000.04011.13
5.2.80.0070.06311.10
5.2.70.0000.06311.18
5.2.60.0000.06011.02
5.2.50.0030.05711.18
5.2.40.0030.06311.02
5.2.30.0100.02310.99
5.2.20.0030.03010.97
5.2.10.0030.03310.93
5.2.00.0070.05010.75
5.1.60.0070.0509.99
5.1.50.0130.04310.07
5.1.40.0100.02710.14
5.1.30.0100.04710.40
5.1.20.0000.02710.42
5.1.10.0030.02310.23
5.1.00.0030.03010.02
5.0.50.0000.0238.55
5.0.40.0030.0378.43
5.0.30.0030.0378.38
5.0.20.0070.0378.22
5.0.10.0000.0408.22
5.0.00.0000.0678.21
4.4.90.0030.0308.21
4.4.80.0070.0338.21
4.4.70.0000.0208.21
4.4.60.0000.0208.21
4.4.50.0030.0208.21
4.4.40.0130.0408.21
4.4.30.0030.0308.21
4.4.20.0030.0178.21
4.4.10.0000.0238.21
4.4.00.0030.0478.21
4.3.110.0000.0238.21
4.3.100.0030.0308.21
4.3.90.0000.0178.21
4.3.80.0070.0408.21
4.3.70.0000.0178.21
4.3.60.0000.0178.21
4.3.50.0000.0178.21
4.3.40.0030.0278.21
4.3.30.0030.0138.21
4.3.20.0000.0238.21
4.3.10.0030.0308.21
4.3.00.0000.0208.21

preferences:
81.81 ms | 401 KiB | 5 Q