3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Cookpedia; class Entry { private $hydrated = false; private $data = [ 'id' => 0, 'title' => null, 'latin_title' => null, 'category' => 0, 'calories' => 0, 'proteins' => 0, 'fats' => 0, 'carbohydrates' => 0, 'description' => null, 'tags' => [], 'measures' => [], ]; public function hydrate(): Entity { return new Entity(...array_values($this->data)); } } class Entity { public $id, $carbohydrates, $measures; public function __construct(int $id, ?string $title, ?string $latinTitle, int $category, int $calories, int $proteins, int $fats, int $carbohydrates, ?string $description, array $tags, array $measures) { $this->id = $id; $this->carbohydrates = $carbohydrates; $this->measures = $measures; } } $entity = (new Entry())->hydrate(); var_dump($entity);

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.1.110.0050.00317.45
8.1.100.0000.00817.31
8.1.90.0060.00317.42
8.1.80.0000.00717.37
8.1.70.0030.00717.41
8.1.60.0040.00417.60
8.1.50.0050.00317.44
8.1.40.0030.00517.42
8.1.30.0070.00017.50
8.1.20.0000.00817.65
8.1.10.0030.00517.57
8.1.00.0040.00417.57
8.0.240.0040.00416.85
8.0.230.0050.00216.91
8.0.220.0000.00716.91
8.0.210.0000.00816.91
8.0.200.0000.00716.86
8.0.190.0050.00316.91
8.0.180.0000.00716.88
8.0.170.0060.00316.84
8.0.160.0040.00416.74
8.0.150.0050.00316.74
8.0.140.0000.00716.70
8.0.130.0030.00313.29
8.0.120.0040.00416.67
8.0.110.0030.00616.88
8.0.100.0040.00416.82
8.0.90.0040.00416.87
8.0.80.0070.00816.83
8.0.70.0040.00416.91
8.0.60.0040.00416.80
8.0.50.0000.00816.66
8.0.30.0080.00817.03
8.0.20.0030.01617.21
8.0.10.0000.00917.09
8.0.00.0120.01016.60
7.4.300.0000.00616.60
7.4.290.0000.00716.49
7.4.280.0040.00416.52
7.4.270.0040.00416.42
7.4.260.0040.00416.40
7.4.250.0040.00416.58
7.4.240.0000.00716.62
7.4.230.0040.00416.44
7.4.220.0000.00816.63
7.4.210.0070.00816.56
7.4.200.0020.00516.32
7.4.160.0070.00916.51
7.4.140.0130.00517.86
7.4.130.0070.01016.42
7.4.120.0200.00616.54
7.4.110.0130.01016.52
7.4.100.0000.01716.59
7.4.90.0080.00816.54
7.4.80.0230.00419.39
7.4.70.0040.01416.39
7.4.60.0060.00916.67
7.4.50.0000.01816.14
7.4.40.0180.00016.68
7.4.00.0100.00715.02
7.3.330.0000.00513.30
7.3.320.0000.00513.00
7.3.310.0040.00416.36
7.3.300.0000.00716.16
7.3.290.0000.01316.16
7.3.280.0040.00816.16
7.3.260.0080.01216.34
7.3.240.0070.01016.32
7.3.230.0080.01116.38
7.3.210.0130.00616.44
7.3.200.0120.00616.59
7.3.190.0090.00916.38
7.3.180.0120.00916.29
7.3.170.0130.00616.57
7.3.160.0120.01216.56
7.3.120.0050.01414.79
7.3.110.0070.01014.72
7.3.100.0060.00814.69
7.3.90.0110.00614.85
7.3.80.0070.00714.70
7.3.70.0080.00514.79
7.3.60.0060.00614.67
7.3.50.0050.01014.76
7.3.40.0060.00814.63
7.3.30.0050.01014.66
7.3.20.0120.00415.79
7.3.10.0070.00815.98
7.3.00.0090.00615.96
7.2.330.0170.00816.64
7.2.320.0120.00616.52
7.2.310.0060.01016.48
7.2.300.0030.01316.63
7.2.290.0060.00916.34
7.2.250.0070.01115.11
7.2.240.0020.01714.85
7.2.230.0070.00815.09
7.2.220.0080.00814.91
7.2.210.0040.00914.93
7.2.200.0050.00814.78
7.2.190.0050.00915.06
7.2.180.0070.01014.93
7.2.170.0060.00914.93
7.2.160.0080.00514.83
7.2.150.0040.01414.81
7.2.140.0190.00614.98
7.2.130.0060.01215.14
7.2.120.0130.01315.15
7.2.110.0130.00015.19
7.2.100.0170.00715.08
7.2.90.0110.00415.01
7.2.80.0070.00715.10
7.2.70.0100.00315.09
7.2.60.0140.00014.96
7.2.50.0140.00014.99
7.2.40.0170.00715.13
7.2.30.0030.00915.24
7.2.20.0030.01014.98
7.2.10.0030.00915.05
7.2.00.0120.01515.33
7.1.330.0050.01015.55
7.1.320.0000.01015.58
7.1.310.0060.00715.83
7.1.300.0030.00815.61
7.1.290.0070.00615.66
7.1.280.0060.01015.13
7.1.270.0070.00715.18
7.1.260.0080.00615.12
7.1.250.0090.00513.75

preferences:
25.24 ms | 410 KiB | 6 Q