3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bla { private $name; function __construct() { $this->name = 'I am this'; echo "We are in\n"; } function dontTouchThis() { return 'not this'; } function touchThis() { return $this->name; } } $lazyBla = (new \ReflectionClass('bla'))->newLazyProxy(function () { return new bla(); }); $whatsThat = $lazyBla->dontTouchThis(); echo $whatsThat . "\n\n"; $whatsThis = $lazyBla->touchThis(); echo $whatsThis . "\n\n"; $bla = new bla;

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.4.150.0020.00014.05
8.4.140.0090.01117.55
8.4.130.0160.00517.77
8.4.120.0110.00920.52
8.4.110.0140.00524.13
8.4.100.0120.00817.84
8.4.90.0060.00720.74
8.4.80.0120.00918.79
8.4.70.0090.00619.29
8.4.60.0140.00719.54
8.4.50.0120.00917.77
8.3.270.0110.00916.75
8.3.260.0100.01016.61
8.3.250.0100.00818.68
8.3.240.0100.01016.66
8.3.230.0060.01216.48
8.3.220.0080.01018.89
8.3.210.0100.00816.77
8.3.200.0130.00616.47
8.3.190.0140.00516.68
8.3.180.0110.00816.38
8.3.50.0110.00916.40
8.2.290.0120.00816.64
8.2.280.0120.00716.76

preferences:
35.89 ms | 403 KiB | 5 Q