0

Some PHP functions such as echo and empty are not callable. You can't, for example, filter an array as follows:

$array = array_filter($array, 'empty');

What are other functions in PHP that are not callable? Is there a list of these functions? Do they have a different name because they aren't callable or are they called 'functions' as well?

  • Possible duplicate of [Array\_filter and empty()](https://stackoverflow.com/questions/8399811/array-filter-and-empty) and/or [empty() not a valid callback?](https://stackoverflow.com/questions/2602983/empty-not-a-valid-callback). – showdev Jul 24 '19 at 19:42
  • Also see [What are language constructs and why do we need them?](https://stackoverflow.com/questions/1180184/what-is-the-difference-between-a-language-construct-and-a-built-in-function-in). – showdev Jul 24 '19 at 19:45
  • @showdev, It is not duplicate!! My question is 'What and which are the php functions that are not callable?` The questions you said ( Array_filter and empty() and/or empty() not a valid callback?) are specifically about `empty`. My question is very different; I am not talking only about empty – Student of Science Jul 24 '19 at 19:46
  • Also, I'm not asking why empty is not a valid callback. I'm asking what and which are invalid callbacks like empty. – Student of Science Jul 24 '19 at 19:47
  • Your question is explained in those posts. They are [language constructs](https://www.php.net/manual/en/reserved.keywords.php). – showdev Jul 24 '19 at 19:49
  • 1
    Then, should I delete this post? – Student of Science Jul 24 '19 at 19:50

1 Answers1

2

In a language or framework, you can usually search for limitations like this under the term of "reserved words".

In PHP's case, you can find a list of reserved keywords here: https://www.php.net/manual/en/reserved.keywords.php

Andrew
  • 827
  • 2
  • 6
  • 14