3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { private $a = 1; private $b = '3'; private $c = ['foo', 'bar' => 'baz']; } $a = new a(); var_export($a); echo PHP_EOL .PHP_EOL; $arr = []; $closure = \Closure::bind(function () use ($arr, $a) { foreach ($mapping as $property => $value) { $object->$property = $value; } }, null, $object); $closure(); var_export($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZOFD
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $arr, !2 = $closure, !3 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $4      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   13     3        INIT_FCALL                                               'var_export'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   15     6        ECHO                                                     '%0A%0A'
   17     7        ASSIGN                                                   !1, <array>
   19     8        INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHZOFD%3A19%240'
         10        BIND_LEXICAL                                             ~9, !1
         11        BIND_LEXICAL                                             ~9, !0
   23    12        SEND_VAL                                                 ~9
         13        SEND_VAL                                                 null
         14        SEND_VAR                                                 !3
         15        DO_FCALL                                      0  $10     
   19    16        ASSIGN                                                   !2, $10
   24    17        INIT_DYNAMIC_CALL                                        !2
         18        DO_FCALL                                      0          
   25    19        INIT_FCALL                                               'var_export'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FHZOFD%3A19%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/HZOFD
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $arr, !1 = $a, !2 = $mapping, !3 = $value, !4 = $property, !5 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   BIND_STATIC                                              !0
          1        BIND_STATIC                                              !1
   20     2      > FE_RESET_R                                       $6      !2, ->8
          3    > > FE_FETCH_R                                       ~7      $6, !3, ->8
          4    >   ASSIGN                                                   !4, ~7
   21     5        ASSIGN_OBJ                                               !5, !4
          6        OP_DATA                                                  !3
   20     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $6
   23     9      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FHZOFD%3A19%240

Class a: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.48 ms | 1396 KiB | 15 Q