3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $a = '0xf'; $b = '15'; $c = 15; var_dump('Vars', $a, $b, $c); var_dump('EQ', $a == $b, $a == $c, $b == $c); */ test('pie', function($a){return $a;}); function test($label, $lambda){ static $a = ['hex' => '0xf', 'str' => '15', 'int' => 15]; echo $label; foreach($a AS $k=>$v) { echo " $k => "; var_export($lambda($v)); // $n = var_export($r, TRUE); } echo "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5CqkA
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL_BY_NAME                                       'test'
          1        SEND_VAL_EX                                              'pie'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5CqkA%3A12%240'
          3        SEND_VAL_EX                                              ~0
          4        DO_FCALL                                      0          
   24     5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5CqkA%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5CqkA
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5CqkA%3A12%240

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/5CqkA
function name:  test
number of ops:  21
compiled vars:  !0 = $label, !1 = $lambda, !2 = $a, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        BIND_STATIC                                              !2
   17     3        ECHO                                                     !0
   18     4      > FE_RESET_R                                       $5      !2, ->18
          5    > > FE_FETCH_R                                       ~6      $5, !3, ->18
          6    >   ASSIGN                                                   !4, ~6
   19     7        ROPE_INIT                                     3  ~9      '+++'
          8        ROPE_ADD                                      1  ~9      ~9, !4
          9        ROPE_END                                      2  ~8      ~9, '+%3D%3E+'
         10        ECHO                                                     ~8
   20    11        INIT_FCALL                                               'var_export'
         12        INIT_DYNAMIC_CALL                                        !1
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0  $11     
         15        SEND_VAR                                                 $11
         16        DO_ICALL                                                 
   18    17      > JMP                                                      ->5
         18    >   FE_FREE                                                  $5
   23    19        ECHO                                                     '%0A'
   24    20      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.9 ms | 1396 KiB | 15 Q