3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $result = array_intersect_assoc( array( '2015-01-01' => array(array('HORA' => '0600', 'MOTIVO' => 'teste')), '2015-01-02' => array(array('HORA' => '0600', 'MOTIVO' => 'teste'),array('HORA' => '0700', 'MOTIVO' => 'teste')), '2015-01-03' => array(array('HORA' => '0600', 'MOTIVO' => 'demo')) ), array( '2015-01-01' => array(array('HORA' => '0600', 'MOTIVO' => 'teste')), '2015-01-02' => array(array('HORA' => '0800', 'MOTIVO' => 'teste')), '2015-01-03' => array(array('HORA' => '0800', 'MOTIVO' => 'demo')) ) ); print_r($result);
based on rsOgn
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/buftP on line 10 Notice: Array to string conversion in /in/buftP on line 10 Notice: Array to string conversion in /in/buftP on line 10 Notice: Array to string conversion in /in/buftP on line 10 Notice: Array to string conversion in /in/buftP on line 10 Notice: Array to string conversion in /in/buftP on line 10 Array ( [2015-01-01] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => teste ) ) [2015-01-02] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => teste ) [1] => Array ( [HORA] => 0700 [MOTIVO] => teste ) ) [2015-01-03] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => demo ) ) )
Output for 5.4.11 - 5.6.28
Notice: Array to string conversion in /in/buftP on line 14 Notice: Array to string conversion in /in/buftP on line 14 Notice: Array to string conversion in /in/buftP on line 14 Notice: Array to string conversion in /in/buftP on line 14 Notice: Array to string conversion in /in/buftP on line 14 Notice: Array to string conversion in /in/buftP on line 14 Array ( [2015-01-01] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => teste ) ) [2015-01-02] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => teste ) [1] => Array ( [HORA] => 0700 [MOTIVO] => teste ) ) [2015-01-03] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => demo ) ) )
Output for 5.3.21 - 5.3.29
Array ( [2015-01-01] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => teste ) ) [2015-01-02] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => teste ) [1] => Array ( [HORA] => 0700 [MOTIVO] => teste ) ) [2015-01-03] => Array ( [0] => Array ( [HORA] => 0600 [MOTIVO] => demo ) ) )