3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ /** * [getData description] * @param array $data [description] * @param string $a [description] * @param int $b [description] * @param boolean $c [description] * @param float $d [description] * @return [type] [description] */ public function getData(array $data, string $a, int $b, float $f, double $d, boolean $c) {} } $a = new A(); $a->getData(["as"],"assasa",12345, 64.153454, 65.41, true);
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.4, 8.3.6
Warning: "double" will be interpreted as a class name. Did you mean "float"? Write "\double" to suppress this warning in /in/hUEnW on line 13 Warning: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning in /in/hUEnW on line 13 Fatal error: Uncaught TypeError: A::getData(): Argument #5 ($d) must be of type double, float given, called in /in/hUEnW on line 18 and defined in /in/hUEnW:13 Stack trace: #0 /in/hUEnW(18): A->getData(Array, 'assasa', 12345, 64.153454, 65.41, true) #1 {main} thrown in /in/hUEnW on line 13
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: "double" will be interpreted as a class name. Did you mean "float"? Write "\double" to suppress this warning in /in/hUEnW on line 13 Warning: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning in /in/hUEnW on line 13 Fatal error: Uncaught TypeError: A::getData(): Argument #5 ($d) must be of type double, float given, called in /in/hUEnW on line 18 and defined in /in/hUEnW:13 Stack trace: #0 /in/hUEnW(18): A->getData(Array, 'assasa', 12345, 64.153454, 65.41, true) #1 {main} thrown in /in/hUEnW on line 13
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.5 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught TypeError: Argument 5 passed to A::getData() must be an instance of double, float given, called in /in/hUEnW on line 18 and defined in /in/hUEnW:13 Stack trace: #0 /in/hUEnW(18): A->getData(Array, 'assasa', 12345, 64.153454, 65.41, true) #1 {main} thrown in /in/hUEnW on line 13
Process exited with code 255.
Output for 5.6.0 - 5.6.27
Catchable fatal error: Argument 2 passed to A::getData() must be an instance of string, string given, called in /in/hUEnW on line 18 and defined in /in/hUEnW on line 13
Process exited with code 255.

preferences:
190.5 ms | 401 KiB | 219 Q