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; } }; $tmpaaa= array('3333','222'); $ttt = new Se(); $ttt->setData($tmpaaa); echo $ttt->getE();

preferences:
45.62 ms | 402 KiB | 5 Q