3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $ref; function __construct () { $this->ref = new class() { public $name; public function sayName() : string { return $name; } }; } public function create (string $name) { $this->ref->name = $name; return clone $this->ref; } } $A = new A(); $testA = $A->create("matti"); $testB = $A->create("Pekka"); var_dump($testA->sayName()); var_dump($testB->sayName());

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.40.0070.01318.82
8.3.30.0120.00318.63
8.3.20.0070.00020.31
8.3.10.0050.00221.85
8.3.00.0040.00423.66
8.2.170.0150.00419.00
8.2.160.0100.00622.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.00
8.2.110.0000.00922.08
8.2.100.0080.00418.04
8.2.90.0030.00519.07
8.2.80.0040.00417.97
8.2.70.0000.00917.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0080.00022.32
8.2.30.0030.00320.61
8.2.20.0070.00017.75
8.2.10.0040.00418.10
8.2.00.0040.00418.04
8.1.270.0060.00323.96
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.02
8.1.230.0040.00719.13
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0070.00317.22
8.1.180.0030.00618.10
8.1.170.0050.00318.59
8.1.160.0000.00720.80
8.1.150.0050.00218.89
8.1.140.0030.00519.57
8.1.130.0030.00317.61
8.1.120.0000.00817.43
8.1.110.0040.00417.47
8.1.100.0000.00817.53
8.1.90.0040.00417.48
8.1.80.0000.00817.50
8.1.70.0000.00717.52
8.1.60.0000.00917.59
8.1.50.0000.00817.54
8.1.40.0060.00317.55
8.1.30.0080.00017.68
8.1.20.0000.00817.71
8.1.10.0040.00417.50
8.1.00.0040.00417.52
8.0.300.0070.00018.77
8.0.290.0000.00816.88
8.0.280.0030.00418.44
8.0.270.0000.00717.16
8.0.260.0030.00317.26
8.0.250.0030.00317.04
8.0.240.0040.00416.95
8.0.230.0000.00817.04
8.0.220.0070.00016.86
8.0.210.0000.00716.98
8.0.200.0070.00317.02
8.0.190.0100.00017.05
8.0.180.0030.00517.03
8.0.170.0090.00016.91
8.0.160.0040.00417.02
8.0.150.0040.00416.89
8.0.140.0030.00616.93
8.0.130.0050.00013.38
8.0.120.0040.00416.82
8.0.110.0050.00216.86
8.0.100.0040.00416.85
8.0.90.0040.00416.94
8.0.80.0030.01416.84
8.0.70.0070.00016.80
8.0.60.0050.00316.76
8.0.50.0000.00716.94
8.0.30.0070.01216.99
8.0.20.0100.01217.40
8.0.10.0000.00717.08
8.0.00.0080.01016.74
7.4.330.0020.00216.82
7.4.320.0030.00316.65
7.4.300.0030.00316.59
7.4.290.0040.00416.58
7.4.280.0090.00016.60
7.4.270.0080.00016.57
7.4.260.0080.00316.35
7.4.250.0040.00416.59
7.4.240.0020.00516.62
7.4.230.0030.00316.58
7.4.220.0140.00716.71
7.4.210.0030.01316.66
7.4.200.0000.00716.44
7.4.160.0090.00616.50
7.4.150.0030.01417.40
7.4.140.0120.00817.86
7.4.130.0130.00616.54
7.4.120.0090.01116.47
7.4.110.0150.00616.68
7.4.100.0180.00016.67
7.4.90.0060.01116.54
7.4.80.0060.01219.39
7.4.70.0060.01616.48
7.4.60.0100.01016.38
7.4.50.0060.00616.52
7.4.40.0040.01216.45
7.4.30.0110.00516.51
7.4.00.0060.00915.00
7.3.330.0020.00213.34
7.3.320.0000.00513.20
7.3.310.0070.00016.35
7.3.300.0000.00716.36
7.3.290.0070.00716.33
7.3.280.0080.01116.37
7.3.270.0100.01417.40
7.3.260.0090.01616.50
7.3.250.0120.01016.43
7.3.240.0090.00916.46
7.3.230.0090.01216.49
7.3.210.0090.00916.42
7.3.200.0090.00919.39
7.3.190.0090.00616.50
7.3.180.0040.01216.43
7.3.170.0110.00716.60
7.3.160.0060.01016.32
7.3.10.0060.00916.63
7.3.00.0060.00916.66
7.2.330.0120.00616.74
7.2.320.0120.00616.82
7.2.310.0110.01116.69
7.2.300.0180.00916.77
7.2.290.0030.01516.80
7.2.130.0120.00316.95
7.2.120.0060.00916.83
7.2.110.0040.01116.81
7.2.100.0030.01016.69
7.2.90.0000.01616.88
7.2.80.0040.01216.92
7.2.70.0030.01016.86
7.2.60.0100.00516.96
7.2.50.0060.00916.72
7.2.40.0080.00417.02
7.2.30.0070.00716.79
7.2.20.0040.00816.95
7.2.10.0060.00916.66
7.2.00.0040.01018.14
7.1.250.0030.01315.54
7.1.200.0000.00715.45
7.1.100.0160.00318.28
7.1.70.0000.01117.15
7.1.60.0040.00819.20
7.1.50.0070.01416.72
7.1.00.0100.07022.43
7.0.200.2550.00316.82
7.0.60.0070.07721.73
7.0.50.0000.07317.88
7.0.40.0030.08720.28
7.0.30.0170.04320.08
7.0.20.0330.05020.07
7.0.10.0070.04720.26
7.0.00.0070.06320.06
5.6.280.0070.02720.78
5.6.210.0070.08720.70
5.6.200.0070.07718.29
5.6.190.0130.08020.55
5.6.180.0230.04720.61
5.6.170.0330.06020.55
5.6.160.0000.04320.56
5.6.150.0100.08018.17
5.6.140.0070.08318.20
5.6.130.0030.05318.17
5.6.120.0030.04720.90
5.6.110.0000.08320.98
5.6.100.0100.06321.02
5.6.90.0170.05720.88
5.6.80.0170.05020.51
5.5.350.0270.03320.41
5.5.340.0170.06717.96
5.5.330.0170.03320.35
5.5.320.0400.04020.36
5.5.310.0270.06020.37
5.5.300.0200.06317.99
5.5.290.0030.05717.95
5.5.280.0100.07720.88
5.5.270.0100.05320.89
5.5.260.0100.07320.97
5.5.250.0070.08020.46
5.5.240.0200.06720.15

preferences:
51.49 ms | 400 KiB | 5 Q