3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayList = array( array( 'uid' => "1234", 'nilai' => getBoolean (1))); function getBoolean ($value) { return (bool)$value; } echo json_encode ($arrayList);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AOdn3B
function name:  (null)
number of ops:  12
compiled vars:  !0 = $arrayList
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~1      '1234', 'uid'
    5     1        INIT_FCALL_BY_NAME                                       'getBoolean'
          2        SEND_VAL_EX                                              1
          3        DO_FCALL                                      0  $2      
          4        ADD_ARRAY_ELEMENT                                ~1      $2, 'nilai'
          5        INIT_ARRAY                                       ~3      ~1
    2     6        ASSIGN                                                   !0, ~3
    9     7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ECHO                                                     $5
         11      > RETURN                                                   1

Function getboolean:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AOdn3B
function name:  getBoolean
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        BOOL                                             ~1      !0
          2      > RETURN                                                   ~1
    8     3*     > RETURN                                                   null

End of function getboolean

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.38 ms | 942 KiB | 17 Q