3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar, $baz; } $foo_reflection = new ReflectionObject(new Foo) var_dump( array_map( function (ReflectionProperty $prop) { $visibility = null; switch ($prop->getModifiers()) { case ReflectionProperty::IS_PUBLIC: $visibility = 'public'; break; case ReflectionProperty::IS_PROTECTED: $visibility = 'protected'; break; case ReflectionProperty::IS_PRIVATE: $visibility = 'private'; break; } return [ 'Name' => $prop->getName(), 'Visibility' => $visibility, ]; }, $foo_reflection->getProperties() ) );

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)
7.0.50.0070.06020.39
7.0.40.0330.05320.29
7.0.30.0270.06020.41
7.0.20.0300.05720.27
7.0.10.0470.03720.27
7.0.00.0300.05720.39
5.6.190.0370.05321.05
5.6.180.0230.06021.09
5.6.170.0330.05321.04
5.6.160.0330.05021.14
5.6.150.0330.05321.14
5.6.140.0300.05321.18
5.6.130.0430.07721.08
5.6.120.0200.05321.08
5.6.110.0170.05321.12
5.6.100.0100.05721.00
5.6.90.0200.05020.99
5.6.80.0300.05320.32
5.6.70.0330.05020.31
5.6.60.0230.05720.41
5.6.50.0270.05320.50
5.6.40.0300.05320.26
5.6.30.0100.05720.52
5.6.20.0070.06020.48
5.6.10.0100.05720.45
5.6.00.0000.06720.36
5.5.330.0330.04720.91
5.5.320.0270.06320.83
5.5.310.0300.05320.94
5.5.300.0230.06020.87
5.5.290.0330.05320.84
5.5.280.0130.05720.84
5.5.270.0100.06020.92
5.5.260.0070.06321.00
5.5.250.0230.06020.64
5.5.240.0300.05320.27
5.5.230.0230.06020.32
5.5.220.0270.05720.30
5.5.210.0370.04720.21
5.5.200.0170.05020.33
5.5.190.0170.05320.22
5.5.180.0170.05020.20
5.5.160.0070.06020.14
5.5.150.0200.05020.03
5.5.140.0330.03720.22
5.5.130.0200.05020.18
5.5.120.0100.05720.27
5.5.110.0070.06020.21
5.5.100.0170.05020.09
5.5.90.0270.03720.03
5.5.80.0130.05320.08
5.5.70.0130.05720.14
5.5.60.0170.05020.15
5.5.50.0200.04720.13
5.5.40.0170.06319.91
5.5.30.0130.05020.22
5.5.20.0070.05720.01
5.5.10.0270.05020.13
5.5.00.0330.05720.22

preferences:
135.22 ms | 1394 KiB | 7 Q