3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SqlContentEntityStorageInterface { public function getTableMapping(array $storage_definitions = NULL); } class SqlContentEntityStorage implements SqlContentEntityStorageInterface { public function getTableMapping(array $storage_definitions = NULL) { $args = func_get_args(); if (isset($args[1])) { $entity_type = $args[1]; print $entity_type; } } } class CustomStorage extends SqlContentEntityStorage { public function getTableMapping(array $storage_definitions = NULL) { parent::getTableMapping($storage_definitions); } } class CustomStorageNoParent extends SqlContentEntityStorage { public function getTableMapping(array $storage_definitions = NULL) { } } (new SqlContentEntityStorage)->getTableMapping(); (new SqlContentEntityStorage)->getTableMapping([], 'node'); (new CustomStorage())->getTableMapping(); (new CustomStorageNoParent())->getTableMapping();
Output for 8.4.1 - 8.4.13
Deprecated: SqlContentEntityStorageInterface::getTableMapping(): Implicitly marking parameter $storage_definitions as nullable is deprecated, the explicit nullable type must be used instead in /in/jVcdq on line 5 Deprecated: SqlContentEntityStorage::getTableMapping(): Implicitly marking parameter $storage_definitions as nullable is deprecated, the explicit nullable type must be used instead in /in/jVcdq on line 10 Deprecated: CustomStorage::getTableMapping(): Implicitly marking parameter $storage_definitions as nullable is deprecated, the explicit nullable type must be used instead in /in/jVcdq on line 20 Deprecated: CustomStorageNoParent::getTableMapping(): Implicitly marking parameter $storage_definitions as nullable is deprecated, the explicit nullable type must be used instead in /in/jVcdq on line 26 node
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26
node

preferences:
150.76 ms | 409 KiB | 5 Q