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]); print_r(unserialize('a:2:{s:13:"brand_user_id";i:123;s:13:"last_login_dt";N;}'));
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/d75ca
function name:  (null)
number of ops:  21
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
    7    14        INIT_FCALL                                               'print_r'
         15        INIT_FCALL                                               'unserialize'
         16        SEND_VAL                                                 'a%3A2%3A%7Bs%3A13%3A%22brand_user_id%22%3Bi%3A123%3Bs%3A13%3A%22last_login_dt%22%3BN%3B%7D'
         17        DO_ICALL                                         $6      
         18        SEND_VAR                                                 $6
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.87 ms | 1395 KiB | 19 Q