3v4l.org

run code in 300+ PHP versions simultaneously
<?php //imp of _invoke magic method class Value { protected $value; public function __construct($value) { $this->value = $value; } public function getValue() { return $this->value; } } $three = new Value(3); $four = new Value(4); $closure = function ($delta) { var_dump($this->getValue() + $delta); }; //$a = new closure(); //$closure(4); $closure->call($three, 4); $closure->call($four, 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.0140.00716.50
8.3.50.0110.00418.13
8.3.40.0070.00718.71
8.3.30.0070.00718.66
8.3.20.0040.00420.34
8.3.10.0050.00320.54
8.3.00.0060.00323.61
8.2.180.0090.00616.50
8.2.170.0140.00022.96
8.2.160.0100.00319.33
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0090.00020.86
8.2.120.0040.00426.35
8.2.110.0050.00520.52
8.2.100.0080.00417.72
8.2.90.0050.00319.05
8.2.80.0000.00917.97
8.2.70.0000.00917.50
8.2.60.0040.00417.68
8.2.50.0000.00918.09
8.2.40.0060.00322.24
8.2.30.0000.00719.39
8.2.20.0060.00317.68
8.2.10.0000.00717.94
8.2.00.0000.00717.99
8.1.280.0140.00425.92
8.1.270.0070.00022.18
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0060.00322.05
8.1.230.0090.00317.42
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0070.00017.23
8.1.180.0080.00018.10
8.1.170.0060.00318.66
8.1.160.0000.00720.74
8.1.150.0040.00420.64
8.1.140.0040.00419.57
8.1.130.0040.00417.75
8.1.120.0000.00717.39
8.1.110.0030.00517.44
8.1.100.0040.00417.49
8.1.90.0000.00717.45
8.1.80.0040.00417.35
8.1.70.0030.00317.46
8.1.60.0080.00017.48
8.1.50.0080.00317.51
8.1.40.0030.00517.54
8.1.30.0040.00417.67
8.1.20.0090.00017.54
8.1.10.0040.00417.43
8.1.00.0080.00017.35
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0050.00318.39
8.0.270.0070.00017.26
8.0.260.0070.00017.21
8.0.250.0000.00616.88
8.0.240.0000.00716.89
8.0.230.0040.00416.92
8.0.220.0000.00716.90
8.0.210.0040.00416.83
8.0.200.0000.00716.98
8.0.190.0040.00416.90
8.0.180.0040.00416.97
8.0.170.0080.00016.91
8.0.160.0080.00016.84
8.0.150.0070.00016.86
8.0.140.0000.00716.76
8.0.130.0070.00013.29
8.0.120.0040.00416.81
8.0.110.0030.00516.95
8.0.100.0050.00216.77
8.0.90.0040.00416.82
8.0.80.0040.01116.90
8.0.70.0050.00216.84
8.0.60.0000.00716.86
8.0.50.0000.00716.73
8.0.30.0100.00917.09
8.0.20.0090.01017.40
8.0.10.0000.00817.03
8.0.00.0120.00516.74
7.4.330.0030.00316.89
7.4.320.0030.00316.65
7.4.300.0060.00016.55
7.4.290.0000.00816.60
7.4.280.0000.00916.48
7.4.270.0040.00416.45
7.4.260.0000.00716.45
7.4.250.0060.00316.61
7.4.240.0000.00716.48
7.4.230.0040.00416.46
7.4.220.0070.01616.71
7.4.210.0100.00716.65
7.4.200.0030.00316.58
7.4.160.0120.00316.46
7.4.150.0080.00917.40
7.4.140.0110.01017.86
7.4.130.0070.01316.35
7.4.120.0090.00916.49
7.4.110.0180.00016.52
7.4.100.0030.01416.66
7.4.90.0030.01316.54
7.4.80.0130.01019.39
7.4.70.0140.00716.34
7.4.60.0070.01616.44
7.4.50.0040.01216.15
7.4.40.0030.01316.51
7.4.30.0150.00416.47
7.4.00.0100.00715.06
7.3.330.0000.00613.39
7.3.320.0060.00013.30
7.3.310.0000.00716.15
7.3.300.0000.00716.31
7.3.290.0000.00716.29
7.3.280.0100.00616.32
7.3.270.0100.00717.40
7.3.260.0160.00016.68
7.3.250.0120.00616.42
7.3.240.0110.00616.32
7.3.230.0060.00916.49
7.3.210.0130.00616.22
7.3.200.0000.01619.39
7.3.190.0130.00316.47
7.3.180.0060.01016.59
7.3.170.0180.00316.31
7.3.160.0120.00316.23
7.3.120.0100.01014.91
7.3.110.0150.00314.82
7.3.100.0030.01015.03
7.3.90.0080.00414.70
7.3.80.0090.00614.89
7.3.70.0100.00714.51
7.3.60.0040.00414.71
7.3.50.0070.00714.90
7.3.40.0110.00314.53
7.3.30.0000.01114.90
7.3.20.0090.00616.58
7.3.10.0040.00816.83
7.3.00.0040.00716.68
7.2.330.0060.01216.48
7.2.320.0120.00616.71
7.2.310.0040.02216.61
7.2.300.0030.01516.38
7.2.290.0030.02016.76
7.2.240.0130.00614.96
7.2.230.0000.01515.16
7.2.220.0060.01315.08
7.2.210.0090.00614.71
7.2.200.0110.00714.82
7.2.190.0000.01214.88
7.2.180.0040.00815.02
7.2.170.0080.00415.10
7.2.160.0100.00315.19
7.2.150.0040.01216.96
7.2.140.0040.00816.70
7.2.130.0040.01116.89
7.2.120.0030.01016.93
7.2.110.0070.00716.61
7.2.100.0040.01116.89
7.2.90.0000.01216.93
7.2.80.0080.00516.73
7.2.70.0070.00716.83
7.2.60.0060.00817.02
7.2.50.0130.00316.94
7.2.40.0070.00716.68
7.2.30.0030.00616.94
7.2.20.0090.00316.97
7.2.10.0060.00617.02
7.2.00.0090.00618.36
7.1.330.0030.01315.64
7.1.320.0030.01015.93
7.1.310.0080.00315.75
7.1.300.0050.00515.79
7.1.290.0000.01315.67
7.1.280.0070.00715.86
7.1.270.0100.00715.78
7.1.260.0090.00615.71
7.1.250.0030.01015.36
7.1.200.0090.00315.79
7.1.100.0000.00918.18
7.1.70.0070.00316.86
7.1.60.0100.01419.40
7.1.50.0100.00316.91
7.1.00.0130.06322.27
7.0.200.0220.00914.49
7.0.60.0370.04020.01
7.0.50.0100.03717.89
7.0.40.0000.04720.42
7.0.30.0230.05020.43
7.0.20.0300.07320.23
7.0.10.0030.09020.23
7.0.00.0030.04320.16
5.6.280.0000.03720.93
5.6.210.0170.07320.75
5.6.200.0100.07318.23
5.6.190.0170.07320.57
5.6.180.0300.07320.33
5.6.170.0200.03720.48
5.6.160.0070.07720.50
5.6.150.0070.03718.27
5.6.140.0030.08318.18
5.6.130.0100.07018.21
5.6.120.0070.04321.02
5.6.110.0030.08721.01
5.6.100.0030.08721.09
5.6.90.0070.07320.97
5.6.80.0070.03320.42
5.5.350.0200.07020.53
5.5.340.0100.04017.95
5.5.330.0130.03320.27
5.5.320.0230.04320.25
5.5.310.0230.08720.19
5.5.300.0030.04317.91
5.5.290.0070.06017.95
5.5.280.0070.04020.80
5.5.270.0000.05720.66
5.5.260.0030.06320.84
5.5.250.0070.08020.47
5.5.240.0270.04020.26

preferences:
55.05 ms | 400 KiB | 5 Q