3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ "Account Verification", null ], [ "Account owner", null ], [ "Account settings", null ], ]; $result = []; foreach ($arr as $key => $value) { $name = $value[0]; $value1 = $value[1]; $result[$name] = (!is_null($value1) ? $value1 : "null"); } echo json_encode($result, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/Ta3OL
function name:  (null)
number of ops:  25
compiled vars:  !0 = $arr, !1 = $result, !2 = $value, !3 = $key, !4 = $name, !5 = $value1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_R                                       $8      !0, ->18
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->18
          4    >   ASSIGN                                                   !3, ~9
   18     5        FETCH_DIM_R                                      ~11     !2, 0
          6        ASSIGN                                                   !4, ~11
   19     7        FETCH_DIM_R                                      ~13     !2, 1
          8        ASSIGN                                                   !5, ~13
   20     9        TYPE_CHECK                                    2  ~16     !5
         10        BOOL_NOT                                         ~17     ~16
         11      > JMPZ                                                     ~17, ->14
         12    >   QM_ASSIGN                                        ~18     !5
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~18     'null'
         15    >   ASSIGN_DIM                                               !1, !4
         16        OP_DATA                                                  ~18
   17    17      > JMP                                                      ->3
         18    >   FE_FREE                                                  $8
   22    19        INIT_FCALL                                               'json_encode'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 128
         22        DO_ICALL                                         $19     
         23        ECHO                                                     $19
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.35 ms | 1011 KiB | 14 Q