3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = [ [ 'email' => 'a@bc.com', 'firstname' => 'peter', 'last_name' => 'griffin', 'company' => 'Nantuket Brewing', 'Addresses' => [ [ 'addr1' => '31 Spooner Ln', 'city' => 'Quahog', 'state' => 'RI' ], // possible more addresses here ], ], // possible more items here // [ // 'email' => 'x@y.z', // ... // ] ]; $asString = json_encode($data); echo($asString); //
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlGhg
function name:  (null)
number of ops:  7
compiled vars:  !0 = $data, !1 = $asString
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   25     1        INIT_FCALL                                                   'json_encode'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !1, $3
   27     5        ECHO                                                         !1
   28     6      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.66 ms | 1905 KiB | 14 Q