3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $f; public function __construct(&$f) { $this->f = &$f; } public function __destruct() { $this->f = function() {"Echo smart ass!\n"}; } } $f = function () use (&$f) { $t = new test($f); print "After this line it the Closure should be destroyed...\n"; }; $f(); $f(); var_dump($f);

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.5.110.0030.04317.29
5.5.100.0070.03317.31
5.5.90.0100.03017.28
5.5.80.0000.04017.24
5.5.70.0000.04017.22
5.5.60.0070.05317.31
5.5.50.0030.04017.29
5.5.40.0030.03717.32
5.5.30.0000.04017.27
5.5.20.0030.03717.16
5.5.10.0100.03017.21
5.5.00.0070.03317.28
5.4.270.0070.07719.01
5.4.260.0000.04019.04
5.4.250.0070.03319.02
5.4.240.0070.06018.88
5.4.230.0070.03719.06
5.4.220.0070.04019.12
5.4.210.0030.03719.12
5.4.200.0070.03319.26
5.4.190.0070.03319.09
5.4.180.0000.04019.04
5.4.170.0070.03319.08
5.4.160.0070.03018.86
5.4.150.0030.03718.99
5.4.140.0030.03316.58
5.4.130.0000.03716.30
5.4.120.0030.03716.38
5.4.110.0100.04016.38
5.4.100.0070.03716.48
5.4.90.0070.03016.40
5.4.80.0030.03316.36
5.4.70.0030.03716.29
5.4.60.0070.03316.21
5.4.50.0000.03716.35
5.4.40.0000.03716.51
5.4.30.0030.03316.47
5.4.20.0000.03716.39
5.4.10.0030.03316.42
5.4.00.0000.04015.96
5.3.280.0000.04314.64
5.3.270.0000.04014.66
5.3.260.0000.05014.57
5.3.250.0030.03314.59
5.3.240.0030.03714.64
5.3.230.0000.04014.60
5.3.220.0070.03314.59
5.3.210.0070.03314.60
5.3.200.0030.03714.61
5.3.190.0030.03714.63
5.3.180.0000.04314.43
5.3.170.0030.03314.62
5.3.160.0070.03014.61
5.3.150.0030.03314.68
5.3.140.0070.03314.63
5.3.130.0070.03314.77
5.3.120.0000.04014.52
5.3.110.0000.04014.77
5.3.100.0030.03314.04
5.3.90.0070.04014.07
5.3.80.0000.03713.87
5.3.70.0030.03314.05
5.3.60.0030.03313.85
5.3.50.0030.03313.85
5.3.40.0070.03013.87
5.3.30.0130.05713.91
5.3.20.0030.07713.59
5.3.10.0070.04313.70
5.3.00.0030.03713.54

preferences:
143.58 ms | 1394 KiB | 7 Q