3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json1 = '{ "employeeid": "1123", "employeename": "EMP 001 NAME", "mMacID": "E0138", "machinename": "FOS", "iscleaning": 1, "isperforming": 1, "isverifying": 1, "cSeqno": 1, "cMacID": "E0138", "cInterval": 112, "cCleanOperationMaxTime": 300, "cPerformOperationMaxTime": 600, "oSequenceID": 6, "oMacID": "E0138", "oItemNumber": " ", "oBatchNumber": " ", "oPONumber": " ", "oCompletedOperation": 0, "oComplOperStartTime": 0, "oCompOperEndndTime": 0, "oOperationToContinue": 1 }'; $json2 = '[ { "pMachineID": "E0138", "pmachinetoLocationSequence": 1, "pLocationNumber": 1, "pLocationName": "TestLoc1", "pLocationInterval": 12, "pImageRequiredForVerifying": 1, "pErrorFound": 0 }, { "pMachineID": "E0138", "pmachinetoLocationSequence": 1, "pLocationNumber": 2, "pLocationName": "TestLoc2", "pLocationInterval": 15, "pImageRequiredForVerifying": 0, "pErrorFound": 0 }, { "pMachineID": "E0138", "pmachinetoLocationSequence": 1, "pLocationNumber": 3, "pLocationName": "TESTLOC3", "pLocationInterval": 18, "pImageRequiredForVerifying": 0, "pErrorFound": 0 }, { "pMachineID": "E0138", "pmachinetoLocationSequence": 1, "pLocationNumber": 1, "pLocationName": "LOC1", "pLocationInterval": 12, "pImageRequiredForVerifying": 0, "pErrorFound": 0 } ]'; $json1ToArray = json_decode($json1, true); $json2ToArray = json_decode($json2, true); $res = array_merge($json1ToArray, $json2ToArray); print_r($res);
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Array ( [employeeid] => 1123 [employeename] => EMP 001 NAME [mMacID] => E0138 [machinename] => FOS [iscleaning] => 1 [isperforming] => 1 [isverifying] => 1 [cSeqno] => 1 [cMacID] => E0138 [cInterval] => 112 [cCleanOperationMaxTime] => 300 [cPerformOperationMaxTime] => 600 [oSequenceID] => 6 [oMacID] => E0138 [oItemNumber] => [oBatchNumber] => [oPONumber] => [oCompletedOperation] => 0 [oComplOperStartTime] => 0 [oCompOperEndndTime] => 0 [oOperationToContinue] => 1 [0] => Array ( [pMachineID] => E0138 [pmachinetoLocationSequence] => 1 [pLocationNumber] => 1 [pLocationName] => TestLoc1 [pLocationInterval] => 12 [pImageRequiredForVerifying] => 1 [pErrorFound] => 0 ) [1] => Array ( [pMachineID] => E0138 [pmachinetoLocationSequence] => 1 [pLocationNumber] => 2 [pLocationName] => TestLoc2 [pLocationInterval] => 15 [pImageRequiredForVerifying] => 0 [pErrorFound] => 0 ) [2] => Array ( [pMachineID] => E0138 [pmachinetoLocationSequence] => 1 [pLocationNumber] => 3 [pLocationName] => TESTLOC3 [pLocationInterval] => 18 [pImageRequiredForVerifying] => 0 [pErrorFound] => 0 ) [3] => Array ( [pMachineID] => E0138 [pmachinetoLocationSequence] => 1 [pLocationNumber] => 1 [pLocationName] => LOC1 [pLocationInterval] => 12 [pImageRequiredForVerifying] => 0 [pErrorFound] => 0 ) )

preferences:
184.88 ms | 407 KiB | 183 Q