3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $values = array(); public static function init() { self::$values = array( 'a' => 'a', 'b' => 'b' ); } public static function find($value) { $values = self::$values; foreach ($values as $val) { if ($value === $val) { return $value; } } return false; } } A::init(); var_dump(A::find('a'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8TO4k
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'init'
          1        DO_FCALL                                      0          
   32     2        INIT_FCALL                                               'var_dump'
          3        INIT_STATIC_METHOD_CALL                                  'A', 'find'
          4        SEND_VAL                                                 'a'
          5        DO_FCALL                                      0  $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class A:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8TO4k
function name:  init
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_STATIC_PROP                                       'values'
   10     1        OP_DATA                                                  <array>
   13     2      > RETURN                                                   null

End of function init

Function find:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/8TO4k
function name:  find
number of ops:  13
compiled vars:  !0 = $value, !1 = $values, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        FETCH_STATIC_PROP_R          unknown             ~3      'values'
          2        ASSIGN                                                   !1, ~3
   19     3      > FE_RESET_R                                       $5      !1, ->10
          4    > > FE_FETCH_R                                               $5, !2, ->10
   20     5    >   IS_IDENTICAL                                             !0, !2
          6      > JMPZ                                                     ~6, ->9
   21     7    >   FE_FREE                                                  $5
          8      > RETURN                                                   !0
   19     9    > > JMP                                                      ->4
         10    >   FE_FREE                                                  $5
   25    11      > RETURN                                                   <false>
   26    12*     > RETURN                                                   null

End of function find

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.69 ms | 1396 KiB | 15 Q