3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objectives_list_param = Array ( 'J_ID.1' => '02031040080', 'J_Name.1' => 'Review the operation and function of the spoiler system', 'J_Score.1' => '42', 'J_Status.1' => 'F', 'J_ID.2' => '02031040060', 'J_Name.2' => 'Review the operation and function of the primary flight control system', 'J_Score.2' => '95', 'J_Status.2' => 'P', 'J_ID.3' => '03001050010', 'J_Name.3' => 'Identify and determine the oxygen system usage requirements', 'J_Score.3' => '67', 'J_Status.3' => 'F' ); $objectives_list = Array ( 'J_ID.1' => '02031040060', 'J_Name.1' => 'Review the operation and function of the primary flight control system', 'J_Score.1' => '', 'J_Status.1' => 'C', 'J_ID.2' => '02031040070', 'J_Name.2' => 'Review the operation and function of the flap and slat system', 'J_Score.2' => '', 'J_Status.2' => 'I', 'J_ID.3' => '02031040080', 'J_Name.3' => 'Review the operation and function of the spoiler system', 'J_Score.3' => '', 'J_Status.3' => 'N' ); $key = array_search('023031040080', $objectives_list); if($key === false){ echo 'Key not found'; }else{ echo $key; } echo "<br />Last element in array is: " . (string) $array_size(objectives_list);
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
Key not found Warning: Undefined variable $array_size in /in/n6otL on line 44 Fatal error: Uncaught Error: Value of type null is not callable in /in/n6otL:44 Stack trace: #0 {main} thrown in /in/n6otL on line 44
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Key not found Notice: Undefined variable: array_size in /in/n6otL on line 44 Fatal error: Uncaught Error: Function name must be a string in /in/n6otL:44 Stack trace: #0 {main} thrown in /in/n6otL on line 44
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Key not found Fatal error: Uncaught Error: Function name must be a string in /in/n6otL:44 Stack trace: #0 {main} thrown in /in/n6otL on line 44
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
Key not found Notice: Undefined variable: array_size in /in/n6otL on line 44 Fatal error: Function name must be a string in /in/n6otL on line 44
Process exited with code 255.

preferences:
216.92 ms | 402 KiB | 339 Q