3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allValues = ['true', 'true', 'true']; echo array_all($allValues, fn($v) => $v === 'true') ? 'all true' : 'some false';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oMkHN
function name:  (null)
number of ops:  12
compiled vars:  !0 = $allValues
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL_BY_NAME                                       'array_all'
          2        SEND_VAR_EX                                              !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0  $3      
          6      > JMPZ                                                     $3, ->9
          7    >   QM_ASSIGN                                        ~4      'all+true'
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      'some+false'
         10    >   ECHO                                                     ~4
         11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oMkHN
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        IS_IDENTICAL                                     ~1      !0, 'true'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.07 ms | 996 KiB | 13 Q