3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ 'Firepack_sn' => '20012205', 'Installation_Date' => '', 'Type' => 'EH', 'Capacity_m3h' => '81', 'Pressure_bar' => '3,4', 'Rpm' => '2930', 'Power_kw' => '72', ], [ 'Firepack_sn' => '20023901', 'Installation_Date' => '', 'Type' => 'DH', 'Capacity_m3h' => '195', 'Pressure_bar' => '4,2', 'Rpm' => '2000', 'Power_kw' => '72', ], ]; $array2 = [ [ 'user_id' => '40009', 'firepack_id' => '20012205', 'activated' => '1', ], [ 'user_id' => '40009', 'firepack_id' => '21020393', 'activated' => '0', ], ]; var_export( array_uintersect( $array1, $array2, fn($a, $b) => ($a['Firepack_sn'] ?? $a['firepack_id']) <=> ($b['Firepack_sn'] ?? $b['firepack_id']) ) );
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
array ( 0 => array ( 'Firepack_sn' => '20012205', 'Installation_Date' => '', 'Type' => 'EH', 'Capacity_m3h' => '81', 'Pressure_bar' => '3,4', 'Rpm' => '2930', 'Power_kw' => '72', ), )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
155.13 ms | 407 KiB | 5 Q