3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = null; echo serialize(['brand_user_id' => 123, 'last_login_dt' => $foo ? $foo->format('Y-m-d') : null]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9VJFe
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    5     1        INIT_FCALL                                               'serialize'
          2        INIT_ARRAY                                       ~2      123, 'brand_user_id'
          3      > JMPZ                                                     !0, ->9
          4    >   INIT_METHOD_CALL                                         !0, 'format'
          5        SEND_VAL_EX                                              'Y-m-d'
          6        DO_FCALL                                      0  $3      
          7        QM_ASSIGN                                        ~4      $3
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      null
         10    >   ADD_ARRAY_ELEMENT                                ~2      ~4, 'last_login_dt'
         11        SEND_VAL                                                 ~2
         12        DO_ICALL                                         $5      
         13        ECHO                                                     $5
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.61 ms | 1394 KiB | 15 Q