3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $json1 = '{ "id":"fennel", "name":"fennel.cs.colostate.edu", "adjacencies":[ { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"okra" }, { "nodeTo":"fennel" }, { "nodeTo":"fennel" }, { "nodeTo":"fennel" } ], "data":{ "relation":"<h4>Status</h4><b>active</b><br /><br/><b>NumFiles:93</b><br /><br/><b>FileList:</b><ul><li>748163226.571095.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163165.557196.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163099.788231.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163159.157435.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163134.401132.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163202.896958.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163045.975979.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163225.178650.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163185.877944.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162891.147073.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162936.623021.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162902.445209.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163151.688497.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163228.193422.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163079.775290.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162919.111029.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162854.814153.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163214.902473.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163220.004748.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162921.668532.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162998.431510.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162950.592927.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163119.405635.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162964.699155.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162866.600750.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162836.735788.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162911.084362.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163206.173822.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163070.197080.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162927.987324.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162841.854151.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163222.440895.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163195.775840.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163056.803118.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162989.398165.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163089.365374.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162869.790751.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162804.817224.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163224.569077.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163009.806523.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162963.391659.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163009.728193.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163164.358032.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163065.030141.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163017.452587.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163009.569301.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162950.499805.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163124.441178.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163191.297202.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163153.184999.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162812.254572.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163099.030398.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162839.930331.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163143.364623.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162914.565597.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163163.636829.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162952.663033.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162912.282781.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162891.253899.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162873.491682.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162802.427995.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162989.233303.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162963.799408.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163133.039361.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162931.177867.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163119.712295.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163076.143135.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162930.723401.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162963.838523.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162875.397866.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162892.011359.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163159.014145.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162920.575654.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162983.522119.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162978.988558.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162866.207165.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163084.981807.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163087.770283.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163017.317622.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162964.513765.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162889.539214.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163180.137993.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162915.201912.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162817.478016.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163174.372880.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162954.114317.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163014.372365.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163228.441090.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163009.462106.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162875.237378.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748163115.944012.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162963.711097.txt<div>(date added: 12/08/2013 14:19:33)</div></li><li>748162802.803033.txt<div>(date added: 12/08/2013 14:19:33)</div></li></ul>" } } '; $json2 = '[{"date":"11"},{"comment":"another quote"},{"comment":"jim"}]'; $array1 = json_decode($json1,true); $array2 = json_decode($json2,true); $$array1 = array_merge($array1, $array2); echo json_encode($array1); print_r($final);
Output for 5.2.0 - 7.1.0
Notice: Array to string conversion in /in/sK0kP on line 65 {"id":"fennel","name":"fennel.cs.colostate.edu","adjacencies":[{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"okra"},{"nodeTo":"fennel"},{"nodeTo":"fennel"},{"nodeTo":"fennel"}],"data":{"relation":"<h4>Status<\/h4><b>active<\/b><br \/><br\/><b>NumFiles:93<\/b><br \/><br\/><b>FileList:<\/b><ul><li>748163226.571095.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163165.557196.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163099.788231.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163159.157435.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163134.401132.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163202.896958.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163045.975979.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163225.178650.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163185.877944.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162891.147073.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162936.623021.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162902.445209.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163151.688497.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163228.193422.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163079.775290.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162919.111029.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162854.814153.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163214.902473.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163220.004748.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162921.668532.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162998.431510.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162950.592927.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163119.405635.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162964.699155.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162866.600750.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162836.735788.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162911.084362.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163206.173822.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163070.197080.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162927.987324.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162841.854151.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163222.440895.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163195.775840.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163056.803118.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162989.398165.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163089.365374.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162869.790751.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162804.817224.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163224.569077.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163009.806523.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162963.391659.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163009.728193.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163164.358032.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163065.030141.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163017.452587.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163009.569301.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162950.499805.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163124.441178.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163191.297202.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163153.184999.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162812.254572.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163099.030398.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162839.930331.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163143.364623.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162914.565597.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163163.636829.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162952.663033.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162912.282781.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162891.253899.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162873.491682.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162802.427995.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162989.233303.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162963.799408.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163133.039361.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162931.177867.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163119.712295.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163076.143135.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162930.723401.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162963.838523.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162875.397866.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162892.011359.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163159.014145.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162920.575654.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162983.522119.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162978.988558.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162866.207165.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163084.981807.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163087.770283.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163017.317622.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162964.513765.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162889.539214.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163180.137993.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162915.201912.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162817.478016.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163174.372880.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162954.114317.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163014.372365.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163228.441090.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163009.462106.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162875.237378.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748163115.944012.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162963.711097.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><li>748162802.803033.txt<div>(date added: 12\/08\/2013 14:19:33)<\/div><\/li><\/ul>"}} Notice: Undefined variable: final in /in/sK0kP on line 68
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/sK0kP on line 62
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/sK0kP on line 62
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/sK0kP on line 62
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/sK0kP on line 62