3v4l.org

run code in 300+ PHP versions simultaneously
<?php $SQLRow=0; class Trip { } $t = new Trip(); $t->Properties->partnerId = "1"; $t->Properties->loadTrackExternalId = $loadNumber; $t->Properties->accountId = "12345678"; $t->Properties->dispatcherId = ""; $t->Properties->dispatcherEmail = $dispatcherEmail; $t->Properties->dispatcherPhoneNumber = "8008888888"; $t->Properties->driverCell = $driverCell; $t->Properties->driverName = $driverName; $t->Properties->carrierDispatcherEmail = $carrierDispatcherEmail; $t->Properties->Carrier->companyName = $Carrier_companyName; $t->Properties->Carrier->contactName = $Carrier_contactName; $t->Properties->Carrier->contactPhone = $Carrier_contactPhone; $t->Properties->Carrier->contactPhoneExt = ""; $t->Properties->Carrier->contactEmail = $Carrier_contactEmail; $t->Properties->Broker->companyName = "CompanyName here"; $t->Properties->Broker->contactName = "John Smith"; $t->Properties->Broker->contactPhone = "8008888888"; $t->Properties->Broker->contactPhoneExt = ""; $t->Properties->Broker->contactEmail = "jsmith@whatever.com"; $t->Properties->Shipper->loadNumber = $shipper_loadNumber; $t->Properties->Shipper->name = $shipper_name; $t->Properties->Shipper->shipperId = $shipper_shipperId; $t->Properties->Shipper->emails = $shipper_email; while($sql_row=oci_fetch_array($stid)) { $SQLRow++; $Stops_orderNumber[$SQLRow]=$sql_row['REFERENCE1']; $Stops_address[$SQLRow]=$sql_row['ADDRESS1']; $Stops_city[$SQLRow]=$sql_row['CITY']; $Stops_state[$SQLRow]=$sql_row['STATE']; $Stops_zipcode[$SQLRow]=$sql_row['ZIP']; $Stops_date[$SQLRow]=$sql_row['JAPT_L_DATE']; $Stops_time[$SQLRow]=$sql_row['LTIME']; $Stops_appt_hours[$SQLRow]=$sql_row['APPT_HOURS']; $Stops_email[$SQLRow]=$sql_row['EMAIL']; $Stops = new class(){}; $Stops->orderNumber = $Stops_orderNumber[$SQLRow]; $Stops->address = $Stops_address[$SQLRow]; $Stops->city = $Stops_city[$SQLRow]; $Stops->state = $Stops_state[$SQLRow]; $Stops->zipcode = $Stops_zipcode[$SQLRow]; $Stops->datetime = ""; $t->Stops []= $Stops; } echo json_encode($t);
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Deprecated: Creation of dynamic property Trip::$Properties is deprecated in /in/RI0G1 on line 6 Fatal error: Uncaught Error: Attempt to assign property "partnerId" on null in /in/RI0G1:6 Stack trace: #0 {main} thrown in /in/RI0G1 on line 6
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 Deprecated: Creation of dynamic property Trip::$Properties is deprecated in /in/RI0G1 on line 6 Fatal error: Uncaught Error: Attempt to assign property "partnerId" on null in /in/RI0G1:6 Stack trace: #0 {main} thrown in /in/RI0G1 on line 6
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Fatal error: Uncaught Error: Attempt to assign property "partnerId" on null in /in/RI0G1:6 Stack trace: #0 {main} thrown in /in/RI0G1 on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.24, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Warning: Creating default object from empty value in /in/RI0G1 on line 6 Notice: Undefined variable: loadNumber in /in/RI0G1 on line 7 Notice: Undefined variable: dispatcherEmail in /in/RI0G1 on line 10 Notice: Undefined variable: driverCell in /in/RI0G1 on line 12 Notice: Undefined variable: driverName in /in/RI0G1 on line 13 Notice: Undefined variable: carrierDispatcherEmail in /in/RI0G1 on line 14 Notice: Undefined variable: Carrier_companyName in /in/RI0G1 on line 15 Warning: Creating default object from empty value in /in/RI0G1 on line 15 Notice: Undefined variable: Carrier_contactName in /in/RI0G1 on line 16 Notice: Undefined variable: Carrier_contactPhone in /in/RI0G1 on line 17 Notice: Undefined variable: Carrier_contactEmail in /in/RI0G1 on line 19 Warning: Creating default object from empty value in /in/RI0G1 on line 21 Notice: Undefined variable: shipper_loadNumber in /in/RI0G1 on line 27 Warning: Creating default object from empty value in /in/RI0G1 on line 27 Notice: Undefined variable: shipper_name in /in/RI0G1 on line 28 Notice: Undefined variable: shipper_shipperId in /in/RI0G1 on line 29 Notice: Undefined variable: shipper_email in /in/RI0G1 on line 30 Fatal error: Uncaught Error: Call to undefined function oci_fetch_array() in /in/RI0G1:32 Stack trace: #0 {main} thrown in /in/RI0G1 on line 32
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Warning: Creating default object from empty value in /in/RI0G1 on line 6 Warning: Creating default object from empty value in /in/RI0G1 on line 15 Warning: Creating default object from empty value in /in/RI0G1 on line 21 Warning: Creating default object from empty value in /in/RI0G1 on line 27 Fatal error: Uncaught Error: Call to undefined function oci_fetch_array() in /in/RI0G1:32 Stack trace: #0 {main} thrown in /in/RI0G1 on line 32
Process exited with code 255.

preferences:
187.39 ms | 402 KiB | 178 Q