3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Embrace; use DateTime; class Embrace { public function testPass(DateTime $date) { return $date->format('Y-m-d'); } } $obj = new Embrace(); $now = new DateTime(); $obj->testPass($now->format('W'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j7FEQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $obj, !1 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'Embrace%5CEmbrace'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        NEW                                              $5      'DateTime'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   15     6        INIT_METHOD_CALL                                         !0, 'testPass'
          7        INIT_METHOD_CALL                                         !1, 'format'
          8        SEND_VAL_EX                                              'W'
          9        DO_FCALL                                      0  $8      
         10        SEND_VAR_NO_REF_EX                                       $8
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class Embrace\Embrace:
Function testpass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j7FEQ
function name:  testPass
number of ops:  6
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_METHOD_CALL                                         !0, 'format'
          2        SEND_VAL_EX                                              'Y-m-d'
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    9     5*     > RETURN                                                   null

End of function testpass

End of class Embrace\Embrace.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.83 ms | 1394 KiB | 13 Q