3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fields = ['value' => 0, 'value' => 0, 'value' => 0]; $empty = function(array $fields) { foreach($fields as $field) { if (empty($field['value'])) { return false; } } }; $greatterThan = function(array $fields) { foreach($fields as $field) { if ($field['value'] >= 1) { return false; } } }; $validAll = function($fields) use ($empty, $greatterThan) { if (!$empty($fields)) { return "invalid some one is empty\n"; } if (!$greatterThan($fields)) { return "invalid some one is les then 1\n"; } }; var_dump($validAll($fields));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcvLJ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $fields, !1 = $empty, !2 = $greatterThan, !3 = $validAll
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FgcvLJ%3A5%240'
          2        ASSIGN                                                   !1, ~5
   13     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FgcvLJ%3A13%241'
          4        ASSIGN                                                   !2, ~7
   21     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FgcvLJ%3A21%242'
          6        BIND_LEXICAL                                             ~9, !1
          7        BIND_LEXICAL                                             ~9, !2
          8        ASSIGN                                                   !3, ~9
   32     9        INIT_FCALL                                               'var_dump'
         10        INIT_DYNAMIC_CALL                                        !3
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $11     
         13        SEND_VAR                                                 $11
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FgcvLJ%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/gcvLJ
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $fields, !1 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1      > FE_RESET_R                                       $2      !0, ->8
          2    > > FE_FETCH_R                                               $2, !1, ->8
    7     3    >   ISSET_ISEMPTY_DIM_OBJ                         1          !1, 'value'
          4      > JMPZ                                                     ~3, ->7
    8     5    >   FE_FREE                                                  $2
          6      > RETURN                                                   <false>
    6     7    > > JMP                                                      ->2
          8    >   FE_FREE                                                  $2
   11     9      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FgcvLJ%3A5%240

Function %00%7Bclosure%7D%2Fin%2FgcvLJ%3A13%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/gcvLJ
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $fields, !1 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1      > FE_RESET_R                                       $2      !0, ->9
          2    > > FE_FETCH_R                                               $2, !1, ->9
   15     3    >   FETCH_DIM_R                                      ~3      !1, 'value'
          4        IS_SMALLER_OR_EQUAL                                      1, ~3
          5      > JMPZ                                                     ~4, ->8
   16     6    >   FE_FREE                                                  $2
          7      > RETURN                                                   <false>
   14     8    > > JMP                                                      ->2
          9    >   FE_FREE                                                  $2
   19    10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FgcvLJ%3A13%241

Function %00%7Bclosure%7D%2Fin%2FgcvLJ%3A21%242:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcvLJ
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $fields, !1 = $empty, !2 = $greatterThan
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
   22     3        INIT_DYNAMIC_CALL                                        !1
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        BOOL_NOT                                         ~4      $3
          7      > JMPZ                                                     ~4, ->9
   23     8    > > RETURN                                                   'invalid+some+one+is+empty%0A'
   26     9    >   INIT_DYNAMIC_CALL                                        !2
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $5      
         12        BOOL_NOT                                         ~6      $5
         13      > JMPZ                                                     ~6, ->15
   27    14    > > RETURN                                                   'invalid+some+one+is+les+then+1%0A'
   29    15    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FgcvLJ%3A21%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.74 ms | 1400 KiB | 15 Q