3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = '{"data":"key=IAfpK, age=58, key=WNVdi, age=64, key=jp9zt, age=47"}'; preg_match_all('/(?:age=)([0-9]+)/', json_decode($data)->data, $matches, PREG_PATTERN_ORDER); if (array_key_exists(1, $matches)) { $greaterThan50 = array_filter($matches[1], fn($age) => intval($age) > 50); var_dump($greaterThan50); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 23
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/95Qea
function name:  (null)
number of ops:  24
compiled vars:  !0 = $data, !1 = $matches, !2 = $greaterThan50
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7B%22data%22%3A%22key%3DIAfpK%2C+age%3D58%2C+key%3DWNVdi%2C+age%3D64%2C+key%3Djp9zt%2C+age%3D47%22%7D'
    5     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%2F%28%3F%3Aage%3D%29%28%5B0-9%5D%2B%29%2F'
          3        INIT_FCALL                                                   'json_decode'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $4      
          6        FETCH_OBJ_R                                          ~5      $4, 'data'
          7        SEND_VAL                                                     ~5
          8        SEND_REF                                                     !1
          9        SEND_VAL                                                     1
         10        DO_ICALL                                                     
    7    11        ARRAY_KEY_EXISTS                                             1, !1
         12      > JMPZ                                                         ~7, ->23
    9    13    >   INIT_FCALL                                                   'array_filter'
         14        FETCH_DIM_R                                          ~8      !1, 1
         15        SEND_VAL                                                     ~8
         16        DECLARE_LAMBDA_FUNCTION                              ~9      [0]
         17        SEND_VAL                                                     ~9
         18        DO_ICALL                                             $10     
         19        ASSIGN                                                       !2, $10
   11    20        INIT_FCALL                                                   'var_dump'
         21        SEND_VAR                                                     !2
         22        DO_ICALL                                                     
   12    23    > > 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/95Qea
function name:  {closure:/in/95Qea:9}
number of ops:  5
compiled vars:  !0 = $age
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
          1        CAST                                              4  ~1      !0
          2        IS_SMALLER                                           ~2      50, ~1
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
143.8 ms | 1773 KiB | 17 Q