3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { private $id; } $time = microtime(true); for ($i = 0; $i < 500000; $i++) { $model = new Model; $refl = new ReflectionClass('Model'); $property = $refl->getProperty('id'); $property->setAccessible(true); $property->setValue($model, 'test'); } $time = microtime(true) - $time; echo 'ReflectionClass took ' . number_format($time, 3) . " seconds\n";
Output for 7.2.10
ReflectionClass took 0.645 seconds
Output for 7.2.9
ReflectionClass took 0.719 seconds
Output for 7.2.8
ReflectionClass took 1.594 seconds
Output for 7.2.7
ReflectionClass took 0.406 seconds
Output for 7.2.6
ReflectionClass took 0.688 seconds
Output for 7.2.5
ReflectionClass took 0.765 seconds
Output for 7.2.4
ReflectionClass took 0.414 seconds
Output for 7.2.3
ReflectionClass took 0.447 seconds
Output for 7.2.2
ReflectionClass took 0.444 seconds
Output for 7.2.1
ReflectionClass took 0.476 seconds
Output for 7.2.0
ReflectionClass took 0.566 seconds
Output for 7.1.22
ReflectionClass took 1.115 seconds
Output for 7.1.21
ReflectionClass took 0.782 seconds
Output for 7.1.20
ReflectionClass took 0.892 seconds
Output for 7.1.19
ReflectionClass took 0.456 seconds
Output for 7.1.18
ReflectionClass took 0.740 seconds
Output for 7.1.17
ReflectionClass took 0.944 seconds
Output for 7.1.16
ReflectionClass took 0.702 seconds
Output for 7.1.15
ReflectionClass took 0.483 seconds
Output for 7.1.14
ReflectionClass took 0.530 seconds
Output for 7.1.13
ReflectionClass took 0.774 seconds
Output for 7.1.12
ReflectionClass took 0.652 seconds
Output for 7.1.11
ReflectionClass took 0.770 seconds
Output for 7.1.10
ReflectionClass took 0.578 seconds
Output for 7.1.9
ReflectionClass took 0.467 seconds
Output for 7.0.27, 7.1.8
ReflectionClass took 0.777 seconds
Output for 7.1.7
ReflectionClass took 0.632 seconds
Output for 7.1.6
ReflectionClass took 0.573 seconds
Output for 7.1.5
ReflectionClass took 0.540 seconds
Output for 7.0.31
ReflectionClass took 1.190 seconds
Output for 7.0.30
ReflectionClass took 0.739 seconds
Output for 7.0.29
ReflectionClass took 0.701 seconds
Output for 7.0.28
ReflectionClass took 0.491 seconds
Output for 7.0.26
ReflectionClass took 0.808 seconds
Output for 7.0.25
ReflectionClass took 0.718 seconds
Output for 7.0.24
ReflectionClass took 1.046 seconds
Output for 7.0.23
ReflectionClass took 0.780 seconds
Output for 7.0.22
ReflectionClass took 0.600 seconds
Output for 7.0.21
ReflectionClass took 0.673 seconds
Output for 7.0.20
ReflectionClass took 0.678 seconds
Output for 7.0.19
ReflectionClass took 0.801 seconds
Output for 5.6.38
ReflectionClass took 1.433 seconds
Output for 5.6.37

Process exited with code 137.
Output for 5.6.36
ReflectionClass took 0.737 seconds
Output for 5.6.35
ReflectionClass took 1.164 seconds
Output for 5.6.34
ReflectionClass took 0.856 seconds
Output for 5.6.33
ReflectionClass took 0.972 seconds
Output for 5.6.32
ReflectionClass took 1.432 seconds
Output for 5.6.31
ReflectionClass took 0.947 seconds

preferences:
75.79 ms | 401 KiB | 55 Q