3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; private $b; public function __construct() { echo 'DA'; } public function getA() {return $this->a;} public function getB() {return $this->b;} public function setA($a) {$this->a = $a;} public function setB($b) {$this->b = $b;} } $class = new ReflectionClass('Foo'); $instance = $class->newInstanceWithoutConstructor(); var_dump($instance); $reflect = new ReflectionObject($instance); $properties = $reflect->getProperties(); $i = 0; foreach ($properties as $property) { $property->setAccessible(true); $property->setValue($instance, $i); $i++; } var_dump($instance); $instance->a = 'Test'; var_dump($instance);

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.0070.01418.43
8.3.50.0110.00818.18
8.3.40.0150.00018.96
8.3.30.0040.01118.89
8.3.20.0040.00420.22
8.3.10.0100.00020.48
8.3.00.0040.00421.69
8.2.180.0070.01118.66
8.2.170.0120.00322.96
8.2.160.0070.00722.25
8.2.150.0040.00424.18
8.2.140.0110.00424.66
8.2.130.0040.00419.30
8.2.120.0030.00626.35
8.2.110.0060.00319.16
8.2.100.0110.00017.93
8.2.90.0040.00419.21
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0080.00018.04
8.2.50.0000.00818.09
8.2.40.0040.00420.56
8.2.30.0100.00019.54
8.2.20.0000.00717.66
8.2.10.0040.00418.22
8.2.00.0040.00418.21
8.1.280.0190.00325.92
8.1.270.0060.00322.20
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00024.02
8.1.230.0080.00417.77
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0000.01017.38
8.1.190.0000.00817.13
8.1.180.0000.00818.10
8.1.170.0030.00618.53
8.1.160.0040.00420.91
8.1.150.0000.00818.84
8.1.140.0040.00419.67
8.1.130.0060.00317.73
8.1.120.0040.00417.49
8.1.110.0020.00517.45
8.1.100.0000.00717.37
8.1.90.0040.00417.34
8.1.80.0040.00417.46
8.1.70.0000.00717.40
8.1.60.0040.00417.50
8.1.50.0060.00317.58
8.1.40.0000.00817.51
8.1.30.0000.00917.70
8.1.20.0030.00617.54
8.1.10.0000.00717.56
8.1.00.0040.00417.59
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0050.00318.48
8.0.270.0030.00317.23
8.0.260.0030.00317.29
8.0.250.0000.00716.98
8.0.240.0000.00817.08
8.0.230.0000.00816.99
8.0.220.0050.00317.03
8.0.210.0040.00417.03
8.0.200.0030.00317.04
8.0.190.0040.00417.10
8.0.180.0000.00816.95
8.0.170.0070.00017.04
8.0.160.0000.00716.93
8.0.150.0000.00716.90
8.0.140.0050.00216.93
8.0.130.0030.00313.44
8.0.120.0080.00016.85
8.0.110.0000.00816.92
8.0.100.0070.00017.03
8.0.90.0070.00016.99
8.0.80.0050.01017.04
8.0.70.0050.00217.03
8.0.60.0020.00516.99
8.0.50.0000.00917.01
8.0.30.0110.00617.14
8.0.20.0130.00717.40
8.0.10.0040.00416.98
8.0.00.0060.01216.79
7.4.330.0030.00316.75
7.4.320.0000.00716.44
7.4.300.0000.00616.53
7.4.290.0040.00416.50
7.4.280.0000.00716.48
7.4.270.0070.00016.62
7.4.260.0000.00816.63
7.4.250.0040.00416.61
7.4.240.0000.00816.66
7.4.230.0030.00316.62
7.4.220.0040.01416.68
7.4.210.0000.01416.64
7.4.200.0030.00316.71
7.4.160.0100.01016.55
7.4.150.0160.00317.40
7.4.140.0110.01017.86
7.4.130.0100.00716.51
7.4.120.0090.00916.57
7.4.110.0100.00716.61
7.4.100.0120.00616.47
7.4.90.0110.01416.69
7.4.80.0100.01019.39
7.4.70.0170.00016.66
7.4.60.0100.00716.50
7.4.50.0030.01216.46
7.4.40.0140.00316.59
7.4.30.0100.00816.36
7.4.00.0030.01314.68
7.3.330.0030.00313.40
7.3.320.0050.00013.41
7.3.310.0000.00716.37
7.3.300.0030.00316.37
7.3.290.0110.00816.40
7.3.280.0130.00716.36
7.3.270.0120.00617.40
7.3.260.0090.01216.45
7.3.250.0160.01216.46
7.3.240.0090.00916.49
7.3.230.0070.01616.63
7.3.210.0000.01716.54
7.3.200.0110.00816.59
7.3.190.0090.00616.61
7.3.180.0060.01016.69
7.3.170.0100.00716.48
7.3.160.0000.01716.57
7.2.330.0040.01716.78
7.2.320.0130.00916.45
7.2.310.0070.01016.73
7.2.300.0120.00616.59
7.2.290.0040.01216.70
7.2.60.0100.00616.98
7.2.00.0030.00919.54
7.1.200.0030.01015.68
7.1.100.0100.00717.77
7.1.70.0000.00817.03
7.1.60.0070.01719.19
7.1.50.0080.00316.93
7.1.00.0100.06722.44
7.0.200.0540.00014.76
7.0.60.0130.05021.59
7.0.50.0130.05717.91
7.0.40.0070.04020.23
7.0.30.0400.07720.06
7.0.20.0230.04320.13
7.0.10.0100.08020.06
7.0.00.0100.05020.12
5.6.280.0030.06721.11
5.6.210.0030.04020.67
5.6.200.0100.08718.15
5.6.190.0170.04020.61
5.6.180.0170.04320.61
5.6.170.0170.04020.54
5.6.160.0070.06320.39
5.6.150.0000.08718.20
5.6.140.0130.03318.15
5.6.130.0070.05018.15
5.6.120.0300.06320.99
5.6.110.0130.07721.03
5.6.100.0100.08021.01
5.6.90.0130.07721.13
5.6.80.0030.04020.41
5.5.350.0300.06020.33
5.5.340.0000.04317.98
5.5.330.0070.09020.25
5.5.320.0230.03720.36
5.5.310.0170.05320.35
5.5.300.0130.04717.97
5.5.290.0100.03318.04
5.5.280.0100.06320.99
5.5.270.0130.04320.77
5.5.260.0000.09020.80
5.5.250.0130.07020.69
5.5.240.0070.07320.16

preferences:
55.72 ms | 401 KiB | 5 Q