3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 30000; class ValueObject { private $f0; private $f1; private $f2; private $f3; private $f4; private $f5; private $f6; private $f7; private $f8; private $f9; public function getF0() { return $this->f0; } public function setF0($v) { $this->f0 = $v; } public function getF1() { return $this->f1; } public function setF1($v) { $this->f1 = $v; } public function getF2() { return $this->f2; } public function setF2($v) { $this->f2 = $v; } public function getF3() { return $this->f3; } public function setF3($v) { $this->f3 = $v; } public function getF4() { return $this->f4; } public function setF4($v) { $this->f4 = $v; } public function getF5() { return $this->f5; } public function setF5($v) { $this->f5 = $v; } public function getF6() { return $this->f6; } public function setF6($v) { $this->f6 = $v; } public function getF7() { return $this->f7; } public function setF7($v) { $this->f7 = $v; } public function getF8() { return $this->f8; } public function setF8($v) { $this->f8 = $v; } public function getF9() { return $this->f9; } public function setF9($v) { $this->f9 = $v; } } $time = microtime(true); $items = array(); for ($i = 0; $i < $count; $i++) { $item = new ValueObject(); $item->setF0('value 0'); $item->setF1('value 1'); $item->setF2('value 2'); $item->setF3('value 3'); $item->setF4('value 4'); $item->setF5('value 5'); $item->setF6('value 6'); $item->setF7('value 7'); $item->setF8('value 8'); $item->setF9('value 9'); $val = $item->getF0(); $val = $item->getF1(); $val = $item->getF2(); $val = $item->getF3(); $val = $item->getF4(); $val = $item->getF5(); $val = $item->getF6(); $val = $item->getF7(); $val = $item->getF8(); $val = $item->getF9(); $items[] = $item; } $spentTime = microtime(true) - $time; echo number_format($spentTime, 3) . ' seconds';
Output for 7.0.5, 7.1.0
0.036 seconds
Output for 7.0.14
0.037 seconds
Output for 7.0.4, 7.0.6
0.034 seconds
Output for 7.0.3
0.023 seconds
Output for 7.0.2
0.038 seconds
Output for 7.0.1
0.032 seconds
Output for 7.0.0
0.031 seconds
Output for hhvm-3.12.0
0.120 seconds
Output for 5.6.11, hhvm-3.10.0
0.098 seconds
Output for 5.6.8, 5.6.28
0.106 seconds
Output for 5.6.21
0.125 seconds
Output for 5.4.27, 5.6.14, 5.6.20
0.099 seconds
Output for 5.6.19
0.096 seconds
Output for 5.6.18
0.072 seconds
Output for 5.6.17
0.082 seconds
Output for 5.6.16
0.100 seconds
Output for 5.4.2, 5.6.15
0.107 seconds
Output for 5.6.10, 5.6.13
0.097 seconds
Output for 5.5.29, 5.5.34, 5.6.12
0.075 seconds
Output for 5.6.9
0.090 seconds
Output for 5.4.41, 5.5.35
0.073 seconds
Output for 5.5.33
0.093 seconds
Output for 5.5.32
0.086 seconds
Output for 5.5.31
0.094 seconds
Output for 5.5.30
0.087 seconds
Output for 5.4.0, 5.4.28, 5.5.27 - 5.5.28
0.091 seconds
Output for 5.5.26
0.080 seconds
Output for 5.5.25
0.078 seconds
Output for 5.5.24
0.060 seconds
Output for 5.4.45
0.108 seconds
Output for 5.4.44
0.069 seconds
Output for 5.4.43
0.067 seconds
Output for 5.4.42
0.065 seconds
Output for 5.4.40
0.068 seconds
Output for 5.4.39
0.129 seconds
Output for 5.4.38
0.258 seconds
Output for 5.4.36 - 5.4.37
0.139 seconds
Output for 5.4.35
0.246 seconds
Output for 5.4.23, 5.4.34
0.137 seconds
Output for 5.4.32
0.151 seconds
Output for 5.4.30 - 5.4.31
0.081 seconds
Output for 5.4.29
0.102 seconds
Output for 5.4.26
0.126 seconds
Output for 5.4.25
0.122 seconds
Output for 5.4.24
0.166 seconds
Output for 5.4.22
0.180 seconds
Output for 5.4.21
0.244 seconds
Output for 5.4.20
0.176 seconds
Output for 5.4.19
0.111 seconds
Output for 5.4.14, 5.4.18
0.163 seconds
Output for 5.4.17
0.162 seconds
Output for 5.4.16
0.192 seconds
Output for 5.4.15
0.153 seconds
Output for 5.4.13
0.109 seconds
Output for 5.4.12
0.143 seconds
Output for 5.4.6 - 5.4.7, 5.4.11
0.161 seconds
Output for 5.4.10
0.184 seconds
Output for 5.4.9
0.158 seconds
Output for 5.4.8
0.188 seconds
Output for 5.4.3, 5.4.5
0.155 seconds
Output for 5.4.4
0.174 seconds
Output for 5.4.1
0.104 seconds
Output for 5.3.11 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/FSJIp on line 77
Process exited with code 255.
Output for 5.3.0 - 5.3.10
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 128 bytes) in /in/FSJIp on line 53
Process exited with code 255.
Output for 5.2.17
0.278 seconds
Output for 5.2.16
0.280 seconds
Output for 5.2.15
0.362 seconds
Output for 5.2.14
0.544 seconds
Output for 5.2.13
0.672 seconds
Output for 5.2.12
0.428 seconds
Output for 5.2.11
0.437 seconds
Output for 5.2.10
0.625 seconds
Output for 5.2.9
0.589 seconds
Output for 5.2.8
0.792 seconds
Output for 5.2.7
0.666 seconds
Output for 5.2.6
0.642 seconds
Output for 5.2.5
0.303 seconds
Output for 5.2.4
0.345 seconds
Output for 5.2.3
0.343 seconds
Output for 5.2.2
0.387 seconds
Output for 5.2.1
0.340 seconds
Output for 5.2.0
0.282 seconds
Output for 5.1.6
0.421 seconds
Output for 5.1.5
0.397 seconds
Output for 5.1.4
0.380 seconds
Output for 5.1.3
0.245 seconds
Output for 5.1.2
0.439 seconds
Output for 5.1.1
0.344 seconds
Output for 5.1.0
0.365 seconds
Output for 5.0.5
0.453 seconds
Output for 5.0.4
0.503 seconds
Output for 5.0.3
0.523 seconds
Output for 5.0.2
0.516 seconds
Output for 5.0.1
0.657 seconds
Output for 5.0.0
0.410 seconds
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/FSJIp on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/FSJIp on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/FSJIp on line 7
Process exited with code 255.