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 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->carbohydrates = $carbohydrates; } } $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.3.60.0040.01118.55
8.3.50.0120.00718.26
8.3.40.0140.00018.93
8.3.30.0070.00718.72
8.3.20.0000.00721.94
8.3.10.0050.00319.32
8.3.00.0000.00721.94
8.2.180.0100.00718.54
8.2.170.0110.00822.96
8.2.160.0000.01422.11
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00226.16
8.2.110.0030.00621.91
8.2.100.0090.00318.22
8.2.90.0000.00817.63
8.2.80.0000.00818.63
8.2.70.0050.00317.63
8.2.60.0000.00817.63
8.2.50.0040.00417.63
8.2.40.0030.00619.25
8.2.30.0080.00020.46
8.2.20.0000.00717.96
8.2.10.0000.00818.77
8.2.00.0000.00719.81
8.1.280.0110.00325.92
8.1.270.0080.00020.83
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00920.63
8.1.230.0040.00717.70
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0050.00317.35
8.1.190.0030.00517.23
8.1.180.0050.00518.10
8.1.170.0050.00317.62
8.1.160.0040.00418.86
8.1.150.0000.00718.76
8.1.140.0030.00320.39
8.1.130.0040.00419.18
8.1.120.0000.00717.42
8.1.110.0030.00517.30
8.1.100.0040.00417.30
8.1.90.0000.00717.43
8.1.80.0050.00317.45
8.1.70.0100.00017.30
8.1.60.0000.00817.61
8.1.50.0080.00017.56
8.1.40.0040.00417.53
8.1.30.0040.00417.70
8.1.20.0080.00017.63
8.1.10.0000.00717.58
8.1.00.0040.00417.55
8.0.300.0030.00618.77
8.0.290.0080.00016.63
8.0.280.0070.00018.40
8.0.270.0070.00017.27
8.0.260.0060.00016.71
8.0.250.0070.00016.84
8.0.240.0000.00716.86
8.0.230.0030.00316.91
8.0.220.0080.00016.73
8.0.210.0040.00416.83
8.0.200.0030.00316.78
8.0.190.0030.00516.80
8.0.180.0040.00416.76
8.0.170.0060.00316.88
8.0.160.0000.00716.89
8.0.150.0040.00716.75
8.0.140.0070.00016.86
8.0.130.0000.00613.25
8.0.120.0040.00416.70
8.0.110.0030.00516.91
8.0.100.0000.00816.80
8.0.90.0000.00716.75
8.0.80.0090.00516.87
8.0.70.0000.00816.63
8.0.60.0000.00716.80
8.0.50.0040.00416.64
8.0.30.0110.00617.21
8.0.20.0090.00917.11
8.0.10.0000.00816.99
8.0.00.0030.01516.64
7.4.330.0000.00516.78
7.4.320.0060.00316.54
7.4.300.0030.00316.49
7.4.290.0040.00416.49
7.4.280.0000.00716.65
7.4.270.0000.00716.37
7.4.260.0030.00316.50
7.4.250.0050.00316.55
7.4.240.0070.00016.62
7.4.230.0000.00716.70
7.4.220.0070.00016.49
7.4.210.0040.01216.71
7.4.200.0070.00016.64
7.4.160.0100.00816.54
7.4.140.0120.00817.86
7.4.130.0100.00716.66
7.4.120.0130.00516.63
7.4.110.0160.00016.55
7.4.100.0090.00816.57
7.4.90.0120.00616.47
7.4.80.0080.01119.39
7.4.70.0090.00716.49
7.4.60.0060.01016.40
7.4.50.0080.00816.29
7.4.40.0070.01016.57
7.4.10.0090.00914.61
7.4.00.0050.01015.03
7.3.330.0050.00013.18
7.3.320.0050.00013.24
7.3.310.0030.00316.14
7.3.300.0000.00716.10
7.3.290.0100.00316.25
7.3.280.0100.00616.24
7.3.260.0080.01216.37
7.3.240.0090.00916.32
7.3.230.0030.01316.27
7.3.210.0100.01016.57
7.3.200.0100.00716.32
7.3.190.0110.01116.36
7.3.180.0130.01016.44
7.3.170.0130.01016.41
7.3.160.0090.00616.38
7.3.130.0140.00314.61
7.3.120.0070.01114.80
7.3.110.0100.00714.73
7.3.100.0070.00314.71
7.3.90.0040.01114.64
7.3.80.0060.00314.20
7.3.70.0060.00814.39
7.3.60.0100.00314.44
7.3.50.0030.00914.64
7.3.40.0050.00814.63
7.3.30.0040.00714.62
7.3.20.0050.01115.48
7.3.10.0090.00715.59
7.3.00.0110.00415.56
7.2.330.0140.00516.55
7.2.320.0040.01416.35
7.2.310.0070.01016.64
7.2.300.0090.00616.66
7.2.290.0100.00616.58
7.2.260.0110.00714.93
7.2.250.0030.01314.88
7.2.240.0000.01414.44
7.2.230.0100.00714.73
7.2.220.0060.00614.96
7.2.210.0090.00415.14
7.2.200.0000.01714.85
7.2.190.0090.00014.96
7.2.180.0090.00314.69
7.2.170.0080.00714.95
7.2.160.0090.00214.79
7.2.150.0080.00615.48
7.2.140.0090.00615.70
7.2.130.0080.00815.80
7.2.120.0090.00515.94
7.2.110.0050.01015.92
7.2.100.0100.00316.00
7.2.90.0040.00715.84
7.2.80.0080.00515.79
7.2.70.0070.00916.07
7.2.60.0090.01115.80
7.2.50.0040.01115.60
7.2.40.0120.00215.91
7.2.30.0090.01115.70
7.2.20.0080.01015.86
7.2.10.0050.00815.86
7.2.00.0110.00315.86
7.1.330.0100.00315.98
7.1.320.0040.00415.56
7.1.310.0080.00015.69
7.1.300.0040.00415.57
7.1.290.0030.00615.57
7.1.280.0130.00614.86
7.1.270.0080.00614.76
7.1.260.0080.00714.82
7.1.250.0070.00514.65
7.1.240.0070.00715.87
7.1.230.0030.01015.59
7.1.220.0000.01015.81
7.1.210.0070.00715.61
7.1.200.0080.00815.39
7.1.190.0040.01115.50
7.1.180.0070.00715.82
7.1.170.0070.01015.81
7.1.160.0030.00915.66
7.1.150.0000.01415.73
7.1.140.0000.01415.59
7.1.130.0060.00615.75
7.1.120.0070.00715.27
7.1.110.0090.00615.39
7.1.100.0060.00315.64
7.1.90.0070.00715.88
7.1.80.0000.01515.49
7.1.70.0090.00415.41
7.1.60.0140.00015.25
7.1.50.0160.00015.55
7.1.40.0040.01215.46
7.1.30.0000.01415.80
7.1.20.0090.00915.70
7.1.10.0100.00715.87
7.1.00.0060.00815.52

preferences:
46.96 ms | 401 KiB | 5 Q