3v4l.org

run code in 300+ PHP versions simultaneously
<?php DEFINE('A', 3); $DAY = 1; class Days{ function __construct($d){ $this->day = $d ; } function addToDate(){ global $DAY; $this->day = $this->day + $DAY; return $this->day; } function modifyDay($d){ global $DAY; $DAY = $d; } function addDefine(){$this->day = $this->day + A; return $this->day} } $p = new Days(5); echo $p->addToDate().' '; $p->modifyDay(8); echo $p->addToDate().' '; echo $p->addDefine().' ';

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.120.0130.07717.30
5.5.110.0100.04717.48
5.5.100.0070.03717.29
5.5.90.0070.08317.24
5.5.80.0030.06317.32
5.5.70.0100.06017.21
5.5.60.0030.07017.22
5.5.50.0130.06717.19
5.5.40.0030.08017.22
5.5.30.0100.07717.33
5.5.20.0030.05317.26
5.5.10.0030.07017.23
5.5.00.0100.05017.18
5.4.280.0130.03319.09
5.4.270.0070.07719.27
5.4.260.0100.03319.14
5.4.250.0030.04018.94
5.4.240.0170.07319.01
5.4.230.0070.06319.04
5.4.220.0100.05319.09
5.4.210.0030.08319.11
5.4.200.0100.07719.01
5.4.190.0100.07019.13
5.4.180.0070.06719.04
5.4.170.0100.07719.00
5.4.160.0030.07719.06
5.4.150.0070.04019.02
5.4.140.0030.07316.41
5.4.130.0100.03316.41
5.4.120.0070.07016.23
5.4.110.0070.07016.23
5.4.100.0000.07716.41
5.4.90.0000.03716.45
5.4.80.0030.07016.57
5.4.70.0070.04716.31
5.4.60.0070.07316.45
5.4.50.0100.03316.43
5.4.40.0070.06716.46
5.4.30.0070.03316.51
5.4.20.0030.07716.44
5.4.10.0030.04316.37
5.4.00.0070.04715.98
5.3.280.0130.07314.56
5.3.270.0070.07714.68
5.3.260.0100.07314.71
5.3.250.0070.04014.64
5.3.240.0070.03714.63
5.3.230.0030.04314.64
5.3.220.0100.05014.60
5.3.210.0030.07714.56
5.3.200.0030.05314.58
5.3.190.0030.04314.59
5.3.180.0030.05314.61
5.3.170.0070.07314.61
5.3.160.0030.07314.57
5.3.150.0100.06714.42
5.3.140.0000.05714.51
5.3.130.0000.06014.56
5.3.120.0070.05714.60
5.3.110.0030.04014.59
5.3.100.0070.03714.25
5.3.90.0070.04014.24
5.3.80.0030.04013.87
5.3.70.0000.08014.03
5.3.60.0100.03013.99
5.3.50.0070.07313.98
5.3.40.0030.06713.98
5.3.30.0000.07013.95
5.3.20.0030.03713.73
5.3.10.0070.03013.70
5.3.00.0070.03313.64

preferences:
143.01 ms | 1394 KiB | 7 Q