3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function floormap_schema(){ $schema['floormap_images'] = array ( 'description' => 'Floor map images.', 'fields' => array ( 'image' => array('type' => 'blob', 'not null' => TRUE,), 'name' => array( 'type' => 'varchar', 'length' => 30, 'not null' => TRUE,), 'active' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,), ), 'unique keys' => array('name' => array('name'), ), ); $schema['floormap_coords'] = array ( 'description' => 'Floor map images.', 'fields' => array ( 'uid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE,), 'floormap' => array( 'type' => 'text', 'not null' => TRUE,), 'item_type' => array( 'type' => 'text', 'not null' => TRUE,), 'pos_a_x' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,), 'pos_a_y' => array( 'type' => 'int', 'unsiged' => TRUE, 'not null' => TRUE,), 'pos_b_x' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,), 'pos_b_y' => array( 'type' => 'int', 'unsiged' => TRUE, 'not null' => TRUE,), 'pos_c_x' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,), 'pos_c_y' => array( 'type' => 'int', 'unsiged' => TRUE,' not null' => TRUE,), 'pos_d_x' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,), 'pos_d_y' => array('type' => 'int', 'unsiged' => TRUE, 'not null' => TRUE,), ), 'unique keys' => array('uid' => array('uid'),), ); return $schema; } print_r(floormap_schema());
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [floormap_images] => Array ( [description] => Floor map images. [fields] => Array ( [image] => Array ( [type] => blob [not null] => 1 ) [name] => Array ( [type] => varchar [length] => 30 [not null] => 1 ) [active] => Array ( [type] => int [unsigned] => 1 [not null] => 1 ) ) [unique keys] => Array ( [name] => Array ( [0] => name ) ) ) [floormap_coords] => Array ( [description] => Floor map images. [fields] => Array ( [uid] => Array ( [type] => serial [unsigned] => 1 [not null] => 1 ) [floormap] => Array ( [type] => text [not null] => 1 ) [item_type] => Array ( [type] => text [not null] => 1 ) [pos_a_x] => Array ( [type] => int [unsigned] => 1 [not null] => 1 ) [pos_a_y] => Array ( [type] => int [unsiged] => 1 [not null] => 1 ) [pos_b_x] => Array ( [type] => int [unsigned] => 1 [not null] => 1 ) [pos_b_y] => Array ( [type] => int [unsiged] => 1 [not null] => 1 ) [pos_c_x] => Array ( [type] => int [unsigned] => 1 [not null] => 1 ) [pos_c_y] => Array ( [type] => int [unsiged] => 1 [ not null] => 1 ) [pos_d_x] => Array ( [type] => int [unsigned] => 1 [not null] => 1 ) [pos_d_y] => Array ( [type] => int [unsiged] => 1 [not null] => 1 ) ) [unique keys] => Array ( [uid] => Array ( [0] => uid ) ) ) )