3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Se { public $data1; public function setData(array ($data)){ if (empty($data)) { throw new InvalidArgumentException('The name of an employee cannot be empty.'); } $data1 = $data; $data1 = array_values($data1); var_dump($data1); } public function getE(){ return $data1[0]; } }; $tmpaaa= array('3333','222'); $ttt = new Se(); $ttt->setData($tmpaaa); echo $ttt->getE();

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.4.210.0050.03912.40
5.4.200.0140.04512.38
5.4.190.0320.08712.38
5.4.180.0150.04412.38
5.4.170.0180.04312.39
5.4.160.0140.04612.38
5.4.150.0170.04512.38
5.4.140.0150.04612.07
5.4.130.0200.03912.05
5.4.120.0160.04412.02
5.4.110.0140.04412.02
5.4.100.0230.03912.01
5.4.90.0120.04712.02
5.4.80.0430.07812.02
5.4.70.0190.04312.01
5.4.60.0210.04912.01
5.4.50.0400.07812.01
5.4.40.0160.04412.00
5.4.30.0120.05212.00
5.4.20.0190.04411.99
5.4.10.0180.04311.99
5.4.00.0290.06411.49
5.3.270.0140.04612.73
5.3.260.0240.06612.72
5.3.250.0160.04312.72
5.3.240.0140.04512.72
5.3.230.0120.04912.71
5.3.220.0180.04112.68
5.3.210.0160.04412.68
5.3.200.0140.04512.68
5.3.190.0270.06312.68
5.3.180.0150.04412.68
5.3.170.0160.04412.67
5.3.160.0190.04012.68
5.3.150.0140.04512.68
5.3.140.0320.06012.66
5.3.130.0160.04512.66
5.3.120.0120.04912.66
5.3.110.0130.04612.66
5.3.100.0100.05012.12
5.3.90.0140.04712.09
5.3.80.0400.08312.08
5.3.70.0130.05112.07
5.3.60.0160.04712.06
5.3.50.0210.06912.00
5.3.40.0170.04312.00
5.3.30.0140.04611.96
5.3.20.0150.04311.74
5.3.10.0110.04411.70
5.3.00.0170.03911.69

preferences:
133.58 ms | 1394 KiB | 7 Q