如果两个数组在不使用任何循环的情况下以相同的格式具有相同的值而不管键

array1 = (a=>1, b=>2, c=>3, d=>1 )
array2 = (g=>1, d=>2, f=>3, e=>1 )

I cannot use === operator as keys are different. The above two arrays has same value format, want to display yes if they have, I can always run a loop but want to avoid that part.

You may be looking for array_values():

<?php
$array1 = ['a'=>1 ,'b'=>2, 'c'=>3, 'd'=> 1];
$array2 = ['g'=>1 ,'d'=>2, 'f'=>3, 'e'=> 1];

var_dump(array_values($array1)===array_values($array2)); // bool(true)
?>

You can temporary standardize the key first using array_values() function.

$tmp1 = array_values(array1);
$tmp2 = array_values(array2);

if($tmp1 === $tmp2) echo 'yes';