3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shit { public static function getShits() { return array( new Shit, new Shit, new Shit ); } public function getTird() { return 'sucks'; } public function getPoopies() { return range(0,10); } } $shits = array(); foreach(Shit::getShits() as $shit) { $shits[] = array( 'tird' => $shit->getTird(), 'fuck' => call_user_func(function() use($shit) { $poopies = array(); foreach($shit->getPoppies() as $poopie) { $poppies[$poopie] = 'sucks'; } return $poopies; }) ); } var_dump($shits);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/hIGCQ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $shits, !1 = $shit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_STATIC_METHOD_CALL                                  'Shit', 'getShits'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->16
          4    > > FE_FETCH_R                                               $4, !1, ->16
   20     5    >   INIT_METHOD_CALL                                         !1, 'getTird'
          6        DO_FCALL                                      0  $6      
          7        INIT_ARRAY                                       ~7      $6, 'tird'
   21     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhIGCQ%3A21%240'
          9        BIND_LEXICAL                                             ~8, !1
   27    10        INIT_USER_CALL                                0          'call_user_func', ~8
         11        DO_FCALL                                      0  $9      
         12        ADD_ARRAY_ELEMENT                                ~7      $9, 'fuck'
   19    13        ASSIGN_DIM                                               !0
   27    14        OP_DATA                                                  ~7
   18    15      > JMP                                                      ->4
         16    >   FE_FREE                                                  $4
   30    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FhIGCQ%3A21%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/hIGCQ
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $shit, !1 = $poopies, !2 = $poopie, !3 = $poppies
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   BIND_STATIC                                              !0
   22     1        ASSIGN                                                   !1, <array>
   23     2        INIT_METHOD_CALL                                         !0, 'getPoppies'
          3        DO_FCALL                                      0  $5      
          4      > FE_RESET_R                                       $6      $5, ->9
          5    > > FE_FETCH_R                                               $6, !2, ->9
   24     6    >   ASSIGN_DIM                                               !3, !2
          7        OP_DATA                                                  'sucks'
   23     8      > JMP                                                      ->5
          9    >   FE_FREE                                                  $6
   26    10      > RETURN                                                   !1
   27    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FhIGCQ%3A21%240

Class Shit:
Function getshits:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hIGCQ
function name:  getShits
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'Shit'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~2      $0
    6     3        NEW                                              $3      'Shit'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~2      $3
    7     6        NEW                                              $5      'Shit'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~2      $5
          9      > RETURN                                                   ~2
    9    10*     > RETURN                                                   null

End of function getshits

Function gettird:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hIGCQ
function name:  getTird
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'sucks'
   12     1*     > RETURN                                                   null

End of function gettird

Function getpoopies:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hIGCQ
function name:  getPoopies
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $0      
          4      > RETURN                                                   $0
   15     5*     > RETURN                                                   null

End of function getpoopies

End of class Shit.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.67 ms | 1400 KiB | 17 Q