3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ private $salutation = 'Hello'; } $c = function($who) { return "{$this->salutation} $who"; }; echo $c->call(new Foo,'Wide World');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a58P8
function name:  (null)
number of ops:  10
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fa58P8%3A7%240'
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_METHOD_CALL                                         !0, 'call'
          3        NEW                                              $3      'Foo'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $3
          6        SEND_VAL_EX                                              'Wide+World'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fa58P8%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a58P8
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $who
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        FETCH_THIS                                       $1      
          2        FETCH_OBJ_R                                      ~2      $1, 'salutation'
          3        ROPE_INIT                                     3  ~4      ~2
          4        ROPE_ADD                                      1  ~4      ~4, '+'
          5        ROPE_END                                      2  ~3      ~4, !0
          6      > RETURN                                                   ~3
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fa58P8%3A7%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.76 ms | 1394 KiB | 13 Q