3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestingInjectingToProtected { protected $value; public function getValue(); } $object = new TestingInjectingToProtected(); $reflection = new ReflectionObject($object); $property = $reflection->getProperty('value'); $property->setAccessible(true); $object->value = 'foo'; $property->setAccessible(false); echo $object->getValue(); $injector = Closure::bindTo(function ($property, $value) { $this->$property = $value; }, $object); $injector('value', 'bar'); echo $object->getValue();

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)
5.4.150.0150.04512.36
5.4.140.0190.04612.05
5.4.130.0160.04512.03
5.4.120.0210.05811.99
5.4.110.0150.04511.99
5.4.100.0250.06611.99
5.4.90.0150.04311.98
5.4.80.0240.04211.99
5.4.70.0270.08111.98
5.4.60.0170.04511.98
5.4.50.0160.04411.98
5.4.40.0260.06611.97
5.4.30.0140.04911.97
5.4.20.0220.07311.97
5.4.10.0200.03911.97
5.4.00.0160.04011.46
5.3.250.0160.04412.72
5.3.240.0150.04612.72
5.3.230.0250.07112.71
5.3.220.0190.04312.68
5.3.210.0190.04712.68
5.3.200.0140.05012.68
5.3.190.0250.06912.68
5.3.180.0200.05712.67
5.3.170.0190.04712.67
5.3.160.0160.04612.67
5.3.150.0270.06812.67
5.3.140.0190.04212.66
5.3.130.0160.04712.66
5.3.120.0190.04912.66
5.3.110.0180.04312.66
5.3.100.0250.07112.12
5.3.90.0190.04712.08
5.3.80.0240.07112.08
5.3.70.0180.04312.08
5.3.60.0190.04512.06
5.3.50.0140.04612.00
5.3.40.0240.06712.00
5.3.30.0210.05511.97
5.3.20.0270.06911.74
5.3.10.0180.04311.71
5.3.00.0150.04711.69

preferences:
139.52 ms | 1394 KiB | 7 Q