3v4l.org

run code in 300+ PHP versions simultaneously
1. <?php 2. 3. class example 4. { 5. public $foo; 6. 7. public function__construct() { 8. $this->function = foo() { 9. return 24; 10. }; 11. } 12. } 13. $exp = new example(); 14. echo ($exp->function)(), PHP_EOL;

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.2.110.0550.00314.24
7.2.100.0490.01114.01
7.2.90.0620.00714.08
7.2.80.0480.00314.11
7.2.70.0600.00014.77
7.2.60.0490.01015.06
7.2.50.0430.01414.86
7.2.40.0620.01314.75
7.2.30.0570.00314.83
7.2.20.0660.00714.46
7.2.10.0640.01014.57
7.2.00.0360.01314.34
7.1.230.0510.00413.55
7.1.220.0780.00613.21
7.1.210.0480.00013.26
7.1.200.0740.00613.12
7.1.190.0320.00713.70
7.1.180.0460.01013.73
7.1.170.0730.01013.60
7.1.160.0490.01113.73
7.1.150.0740.00413.68
7.1.140.0740.01413.70
7.1.130.0600.00613.14
7.1.120.0530.00313.30
7.1.110.0730.00013.70
7.1.100.0530.00413.67
7.1.90.0910.01013.59
7.1.80.0670.00313.62
7.1.70.0500.01013.74
7.1.60.0690.01631.60
7.1.50.0810.01631.52
7.1.40.0800.01631.59
7.1.30.1220.01331.59
7.1.20.1020.00331.77
7.1.10.1190.01013.66
7.1.00.0950.01313.54
5.6.380.0170.00413.82

preferences:
140.25 ms | 1394 KiB | 7 Q