3v4l.org

run code in 300+ PHP versions simultaneously
<?php class String { private $string; public function__construct($string) { $this->string = $string; } } class Clazz { private $a; private $b; private $c; private $d; private $e; public function __construct(String $a, String $b, String $c, String $d, String $e) { $this->a = $a; $this->b = $b; $this->c = $c; $this->d = $d; $this->e = $e; } } $classes = array(); for ($i = 0; $i < 50000, $i++) { $classes[] = new Clazz(new String('a'), new String('b'), new String('c'), new String('d'), new String('e')); }
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected 'function__construct' (T_STRING), expecting variable (T_VARIABLE) in /in/5ZP3N on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/5ZP3N on line 7
Process exited with code 255.

preferences:
179.85 ms | 1395 KiB | 55 Q