3v4l.org

run code in 300+ PHP versions simultaneously
<?php $resolver->setDefaults(array( 'validation_groups' => function (FormInterface $form) { $data = $form->getData(); if (Client::TYPE_PERSON == $data->getType()) { return array('Default', 'person'); } return array('Default', 'company'); }, ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JDuMa
function name:  (null)
number of ops:  6
compiled vars:  !0 = $resolver
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_METHOD_CALL                                         !0, 'setDefaults'
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJDuMa%3A5%240'
   13     2        INIT_ARRAY                                       ~2      ~1, 'validation_groups'
          3        SEND_VAL_EX                                              ~2
          4        DO_FCALL                                      0          
   14     5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FJDuMa%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JDuMa
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $form, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_METHOD_CALL                                         !0, 'getData'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !1, $2
    8     4        FETCH_CLASS_CONSTANT                             ~4      'Client', 'TYPE_PERSON'
          5        INIT_METHOD_CALL                                         !1, 'getType'
          6        DO_FCALL                                      0  $5      
          7        IS_EQUAL                                                 $5, ~4
          8      > JMPZ                                                     ~6, ->10
    9     9    > > RETURN                                                   <array>
   12    10    > > RETURN                                                   <array>
   13    11*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.83 ms | 1394 KiB | 13 Q