3v4l.org

run code in 500+ PHP versions simultaneously
<?php class G { public function generate($code): string { $now =new Datetime('now'); return $now->format('dmyhmi').$code; } } $g = new G; var_dump($g->generate('abc'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lp9K4
function name:  (null)
number of ops:  10
compiled vars:  !0 = $g
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   NEW                                                  $1      'G'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   17     3        INIT_FCALL                                                   'var_dump'
          4        INIT_METHOD_CALL                                             !0, 'generate'
          5        SEND_VAL_EX                                                  'abc'
          6        DO_FCALL                                          0  $4      
          7        SEND_VAR                                                     $4
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

Class G:
Function generate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lp9K4
function name:  generate
number of ops:  13
compiled vars:  !0 = $code, !1 = $now
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    9     1        NEW                                                  $2      'Datetime'
          2        SEND_VAL_EX                                                  'now'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $2
   10     5        INIT_METHOD_CALL                                             !1, 'format'
          6        SEND_VAL_EX                                                  'dmyhmi'
          7        DO_FCALL                                          0  $5      
          8        CONCAT                                               ~6      $5, !0
          9        VERIFY_RETURN_TYPE                                           ~6
         10      > RETURN                                                       ~6
   12    11*       VERIFY_RETURN_TYPE                                           
         12*     > RETURN                                                       null

End of function generate

End of class G.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.66 ms | 2027 KiB | 14 Q