3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (($ver = phpversion()) != '5.5.0beta4') die($ver); function getArticle () { $article = (yield (yield "Article 1")); yield $article; } function fce() { return 150; } $d = getArticle(); foreach ($d as $key => $val) { echo "$key: $val\n"; var_dump($val); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/MfQ8V
function name:  (null)
number of ops:  23
compiled vars:  !0 = $ver, !1 = $d, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $4      
          2        ASSIGN                                           ~5      !0, $4
          3        IS_NOT_EQUAL                                             ~5, '5.5.0beta4'
          4      > JMPZ                                                     ~6, ->6
          5    > > EXIT                                                     !0
   15     6    >   INIT_FCALL                                               'getarticle'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !1, $7
   17     9      > FE_RESET_R                                       $9      !1, ->21
         10    > > FE_FETCH_R                                       ~10     $9, !2, ->21
         11    >   ASSIGN                                                   !3, ~10
   19    12        ROPE_INIT                                     4  ~13     !3
         13        ROPE_ADD                                      1  ~13     ~13, '%3A+'
         14        ROPE_ADD                                      2  ~13     ~13, !2
         15        ROPE_END                                      3  ~12     ~13, '%0A'
         16        ECHO                                                     ~12
   20    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
   17    20      > JMP                                                      ->10
         21    >   FE_FREE                                                  $9
   21    22      > RETURN                                                   1

Function getarticle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/MfQ8V
function name:  getArticle
number of ops:  6
compiled vars:  !0 = $article
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
    6     1        YIELD                                            $1      'Article+1'
          2        YIELD                                            $2      $1
          3        ASSIGN                                                   !0, $2
    7     4        YIELD                                                    !0
    8     5      > GENERATOR_RETURN                                         

End of function getarticle

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

End of function fce

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1394 KiB | 18 Q