3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filter = array( "grant_type" => array("filter" => FILTER_VALIDATE_REGEXP, "options" => array("regexp" => "/^(authorization_code|password|assertion|refresh_token|none)$/"), "flags" => FILTER_REQUIRE_SCALAR), "scope" => array("flags" => FILTER_REQUIRE_SCALAR), "code" => array("flags" => FILTER_REQUIRE_SCALAR), "redirect_uri" => array("filter" => FILTER_SANITIZE_URL), "username" => array("flags" => FILTER_REQUIRE_SCALAR), "password" => array("flags" => FILTER_REQUIRE_SCALAR), "assertion_type" => array("flags" => FILTER_REQUIRE_SCALAR), "assertion" => array("flags" => FILTER_REQUIRE_SCALAR), "refresh_token" => array("flags" => FILTER_REQUIRE_SCALAR), "user_id" => array("filter" => FILTER_VALIDATE_INT), ); $arResult["user_id"] = 1234; $arResult["client_id"] = $client_id; $arResult = filter_var_array($arResult, $filter); var_dump($arResult);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f10qf
function name:  (null)
number of ops:  14
compiled vars:  !0 = $filter, !1 = $arResult, !2 = $client_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN_DIM                                               !1, 'user_id'
          2        OP_DATA                                                  1234
   16     3        ASSIGN_DIM                                               !1, 'client_id'
          4        OP_DATA                                                  !2
   18     5        INIT_FCALL                                               'filter_var_array'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
   19    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.39 ms | 1432 KiB | 15 Q