3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $name; private $value; public function __construct($name, $value) { $this->name = $name; $this->value = $value; } public function __get($prop) { return $this->$prop; } public function __isset($prop) { return isset($this->$prop); } } $ar = [ new Foo('foo', 'a'), new Foo('bar', 'b'), new Foo('baz', 'c') ]; print_r(array_column($ar, 'value', 'name'));

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.0110.00418.43
8.3.50.0070.00719.73
8.3.40.0070.01418.70
8.3.30.0090.00618.75
8.3.20.0040.00421.60
8.3.10.0070.00021.76
8.3.00.0040.00419.38
8.2.180.0070.01125.92
8.2.170.0040.01122.96
8.2.160.0070.01020.41
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0060.00321.12
8.2.110.0100.00022.27
8.2.100.0060.00617.85
8.2.90.0040.00717.63
8.2.80.0000.00817.97
8.2.70.0000.01017.63
8.2.60.0060.00317.80
8.2.50.0000.00818.10
8.2.40.0000.00720.30
8.2.30.0020.00519.12
8.2.20.0030.00518.01
8.2.10.0030.00518.10
8.2.00.0000.00817.55
8.1.280.0110.00425.92
8.1.270.0070.00020.20
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00023.92
8.1.230.0040.00722.69
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0040.00417.35
8.1.190.0050.00317.22
8.1.180.0060.00318.10
8.1.170.0060.00318.50
8.1.160.0080.00018.78
8.1.150.0050.00320.19
8.1.140.0040.00419.49
8.1.130.0000.00719.00
8.1.120.0040.00417.32
8.1.110.0030.00517.42
8.1.100.0080.00017.45
8.1.90.0060.00317.34
8.1.80.0040.00417.45
8.1.70.0070.00017.38
8.1.60.0080.00017.54
8.1.50.0050.00317.53
8.1.40.0070.00017.48
8.1.30.0000.00817.62
8.1.20.0080.00017.62
8.1.10.0040.00417.46
8.1.00.0050.00317.55
8.0.300.0040.00420.07
8.0.290.0000.00816.63
8.0.280.0070.00018.43
8.0.270.0030.00316.71
8.0.260.0030.00617.27
8.0.250.0000.00716.82
8.0.240.0000.00716.87
8.0.230.0030.00316.93
8.0.220.0030.00316.87
8.0.210.0000.00716.79
8.0.200.0070.00016.94
8.0.190.0030.00316.98
8.0.180.0030.00616.96
8.0.170.0040.00416.81
8.0.160.0030.00616.89
8.0.150.0000.00816.93
8.0.140.0040.00416.91
8.0.130.0050.00013.39
8.0.120.0080.00016.75
8.0.110.0080.00016.76
8.0.100.0040.00416.77
8.0.90.0040.00416.95
8.0.80.0070.01116.77
8.0.70.0000.00716.73
8.0.60.0080.00016.93
8.0.50.0030.00616.93
8.0.30.0140.00717.09
8.0.20.0090.00917.40
8.0.10.0040.00417.00
8.0.00.0110.01116.79
7.4.330.0020.00215.55
7.4.320.0030.00316.39
7.4.300.0000.00716.39
7.4.290.0030.00416.53
7.4.280.0030.00516.45
7.4.270.0000.00716.64
7.4.260.0000.00816.47
7.4.250.0030.00316.61
7.4.240.0030.00316.54
7.4.230.0030.00316.60
7.4.220.0150.00316.52
7.4.210.0040.01116.49
7.4.200.0000.00716.34
7.4.160.0100.00516.60
7.4.150.0130.01017.40
7.4.140.0070.01017.86
7.4.130.0110.00716.47
7.4.120.0100.00916.42
7.4.110.0090.00916.54
7.4.100.0070.01016.48
7.4.90.0110.00516.49
7.4.80.0030.01619.39
7.4.70.0160.00616.61
7.4.60.0040.01216.52
7.4.50.0070.01016.55
7.4.40.0030.01316.71
7.4.30.0070.01016.61
7.4.00.0000.01514.95
7.3.330.0000.00713.31
7.3.320.0000.00613.18
7.3.310.0040.00416.34
7.3.300.0000.00716.27
7.3.290.0120.00616.33
7.3.280.0120.00716.35
7.3.270.0100.00717.40
7.3.260.0100.01016.33
7.3.250.0120.00816.53
7.3.240.0070.00916.56
7.3.230.0120.01216.54
7.3.210.0130.00316.38
7.3.200.0090.00916.32
7.3.190.0090.00616.39
7.3.180.0040.01216.35
7.3.170.0030.01616.78
7.3.160.0100.00716.34
7.2.330.0130.00716.85
7.2.320.0080.00916.72
7.2.310.0030.01316.48
7.2.300.0130.01016.52
7.2.290.0030.01716.76
7.2.120.0770.00914.82
7.2.110.0390.00314.58
7.2.100.0600.00614.66
7.2.90.0550.01414.75
7.2.80.0580.01014.74
7.2.70.0410.00014.98
7.2.60.0250.00815.87
7.2.50.0360.01215.02
7.2.40.0420.00615.05
7.2.30.0370.01014.77
7.2.20.0440.00014.94
7.2.10.0100.00714.85
7.2.00.0160.01117.20
7.1.240.0570.00313.74
7.1.230.0410.00313.87
7.1.220.0100.00913.96
7.1.210.0420.00613.81
7.1.200.0520.00214.96
7.1.190.0410.00313.88
7.1.180.0660.00713.86
7.1.170.0330.00713.86
7.1.160.0370.00913.74
7.1.150.0360.00713.96
7.1.140.0610.01113.83
7.1.130.0100.00713.88
7.1.120.0550.00313.84
7.1.110.0210.00413.86
7.1.100.0060.00915.84
7.1.90.0750.00313.89
7.1.80.0510.00613.79
7.1.70.0320.00515.46
7.1.60.0310.00915.37
7.1.50.0300.00515.48
7.1.40.0350.00515.17
7.1.30.0150.01015.12
7.1.20.0140.00915.27
7.1.10.0180.00615.23
7.1.00.0330.00815.31
7.0.320.0510.00313.13
7.0.310.0180.01113.41
7.0.300.0450.00713.41
7.0.290.0390.01413.24
7.0.280.0160.00413.40
7.0.270.0630.01013.46
7.0.260.0720.00713.33
7.0.250.1090.00413.54
7.0.240.0960.00913.52
7.0.230.0480.01013.24
7.0.220.0490.01013.68
7.0.210.0510.00313.42
7.0.200.0180.00815.05
7.0.190.0260.00315.06
7.0.180.0270.00414.80
7.0.170.0400.00714.96
7.0.160.0190.00714.80
7.0.150.0180.01114.99
7.0.140.0160.01014.88
7.0.130.0190.00515.09
7.0.120.0270.00615.09
7.0.110.0190.00815.02
7.0.100.0170.00614.88
7.0.90.0250.00815.05
7.0.80.0190.00714.95
7.0.70.0270.00314.88
7.0.60.0190.00515.05
7.0.50.0200.00614.89
7.0.40.0220.00214.56
7.0.30.0130.01014.62
7.0.20.0140.01014.63
7.0.10.0250.00414.65
7.0.00.0140.01114.59
5.6.380.0070.00714.41

preferences:
38.6 ms | 400 KiB | 5 Q