3v4l.org

run code in 300+ PHP versions simultaneously
<?php array( "room_wifi" => "wifi", "room_aircon" => "air", "room_pets" => "pet", // Funkcije so tukaj, ker imamo tip kot int. V tem primeru moramo preveriti // ali je value = 0, ker v tem primeru ocitno fact ne velja. Za bool // je pa lahko seveda obični mapping. "sports_pool_indoor" => function ($v) { return (($v) ? array("ipl", "pol") : null); }, "sports_pooloutdoor" => function ($v) { return (($v) ? "pol" : null); }, "sports_poolfreshwater" => function ($v) { return (($v) ? "pol" : null); }, "sports_poolsaltwater" => function ($v) { return (($v) ? "pol" : null); }, "sports_poolchildrens" => function ($v) { return (($v) ? "pol" : null); }, "sports_poolbar" => function ($v) { return (($v) ? "pol" : null); }, "sports_numberofpools" => function ($v) { return (($v) ? "pol" : null); }, "sports_poolheated" => function ($v) { return (($v) ? "pol" : null); }, "m2_object_has_pool" => function ($v) { return (($v) ? "pol" : null); }, "m2_object_has_inpool" => function ($v) { return (($v) ? "ipl" : null); }, "daccess_pool" => "pol", "object_has_pool" => "pol", "object_has_inpool" => array("ipl", "pol"), "num_pets_allowed" => function ($v) { return (($v > 1) ? "pet" : null); }, "dist_sea" => function ($v) { if ($v < 100) return "bea"; if (($v >= 100) && ($v <= 500)) return "ben"; return null; }, );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  (null)
number of ops:  32
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~0      'wifi', 'room_wifi'
    4     1        ADD_ARRAY_ELEMENT                                ~0      'air', 'room_aircon'
    5     2        ADD_ARRAY_ELEMENT                                ~0      'pet', 'room_pets'
   10     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A10%240'
          4        ADD_ARRAY_ELEMENT                                ~0      ~1, 'sports_pool_indoor'
   11     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A11%241'
          6        ADD_ARRAY_ELEMENT                                ~0      ~2, 'sports_pooloutdoor'
   12     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A12%242'
          8        ADD_ARRAY_ELEMENT                                ~0      ~3, 'sports_poolfreshwater'
   13     9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A13%243'
         10        ADD_ARRAY_ELEMENT                                ~0      ~4, 'sports_poolsaltwater'
   14    11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A14%244'
         12        ADD_ARRAY_ELEMENT                                ~0      ~5, 'sports_poolchildrens'
   15    13        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A15%245'
         14        ADD_ARRAY_ELEMENT                                ~0      ~6, 'sports_poolbar'
   16    15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A16%246'
         16        ADD_ARRAY_ELEMENT                                ~0      ~7, 'sports_numberofpools'
   17    17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A17%247'
         18        ADD_ARRAY_ELEMENT                                ~0      ~8, 'sports_poolheated'
   18    19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A18%248'
         20        ADD_ARRAY_ELEMENT                                ~0      ~9, 'm2_object_has_pool'
   19    21        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A19%249'
         22        ADD_ARRAY_ELEMENT                                ~0      ~10, 'm2_object_has_inpool'
   20    23        ADD_ARRAY_ELEMENT                                ~0      'pol', 'daccess_pool'
   21    24        ADD_ARRAY_ELEMENT                                ~0      'pol', 'object_has_pool'
    3    25        ADD_ARRAY_ELEMENT                                ~0      <array>, 'object_has_inpool'
   24    26        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A24%24a'
         27        ADD_ARRAY_ELEMENT                                ~0      ~11, 'num_pets_allowed'
   25    28        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaLvIX%3A25%24b'
   29    29        ADD_ARRAY_ELEMENT                                ~0      ~12, 'dist_sea'
         30        FREE                                                     ~0
   30    31      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A10%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      <array>
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A10%240

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A11%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A11%241

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A12%242:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A12%242

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A13%243:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A13%243

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A14%244:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A14%244

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A15%245:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A15%245

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A16%246:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A16%246

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A17%247:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A17%247

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A18%248:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'pol'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A18%248

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A19%249:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'ipl'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      null
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A19%249

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A24%24a:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLvIX
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        IS_SMALLER                                               1, !0
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      'pet'
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      null
          6    > > RETURN                                                   ~2
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A24%24a

Function %00%7Bclosure%7D%2Fin%2FaLvIX%3A25%24b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
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
Branch analysis from position: 8
filename:       /in/aLvIX
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   26     1        IS_SMALLER                                               !0, 100
          2      > JMPZ                                                     ~1, ->4
          3    > > RETURN                                                   'bea'
   27     4    >   IS_SMALLER_OR_EQUAL                              ~2      100, !0
          5      > JMPZ_EX                                          ~2      ~2, ->8
          6    >   IS_SMALLER_OR_EQUAL                              ~3      !0, 500
          7        BOOL                                             ~2      ~3
          8    > > JMPZ                                                     ~2, ->10
          9    > > RETURN                                                   'ben'
   28    10    > > RETURN                                                   null
   29    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaLvIX%3A25%24b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.5 ms | 1411 KiB | 13 Q