3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Test{ public function testtreit(){ return 'Это трейт !'; } } class Apple { public $var1; public $var2 = 'Orange'; public function type() { return 'Apple'; } public function __call($name, $arg=''){ ReflectionClass::export($name); } } $ar = new Apple(); $ar->Test(); ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined method ReflectionClass::export() in /in/7QR3D:16 Stack trace: #0 /in/7QR3D(21): Apple->__call('Test', Array) #1 {main} thrown in /in/7QR3D on line 16
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: Function ReflectionClass::export() is deprecated in /in/7QR3D on line 16 Trait [ <user> trait Test ] { @@ /in/7QR3D 2-6 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user> public method testtreit ] { @@ /in/7QR3D 3 - 5 } } }
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33
Trait [ <user> trait Test ] { @@ /in/7QR3D 2-6 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user> public method testtreit ] { @@ /in/7QR3D 3 - 5 } } }

preferences:
179.94 ms | 403 KiB | 180 Q