Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8989097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:10:13+00:00 2026-06-15T22:10:13+00:00

<?php function myFunction($yesNname) { } empty($noName); print_r($noName); isset($noName); myFunction($noName); output: PHP Notice: Undefined variable:

  • 0
<?php

function myFunction($yesNname) { } 

empty($noName);
print_r($noName);
isset($noName);

myFunction($noName);

output:

PHP Notice:  Undefined variable: noName ... on line 6 // print_r
PHP Notice:  Undefined variable: noName ... on line 9 // myFunction

The undefined variable is used in empty() and isset(). But PHP didn’t issue notice about it. Why PHP shows discrimination to some function? How can I write such type of function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:10:14+00:00Added an answer on June 15, 2026 at 10:10 pm

    Neither isset() nor empty() are functions. As the manual explains:

    this is a language construct and not a function

    To get this behaviour you’d need to tweak the PHP source code written in C.

    It’s possible that you can also get this behaviour with a PHP extension, but you’d also need to write it in C and install it in your server.

    Update:

    • Manual page for isset()
    • Manual page for empty()
    • Guide to the Zend Engine
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP we can specify default value of variable in function like: function myFunction(myDefaultVariable,
I found a php function checkdate() , but strangely enough it only seems to
I'm trying to use the php function method_exists, but I need to check if
I have the following in php: public function myfunction($v){ //ini_set(memory_limit,32M); $v=mysqli_real_escape_string($this->connection,$v); $stmt=mysqli_prepare($this->connection,SELECT * from
can I use this syntax under PHP 4 (default function parameter) : function myFunction($arg1
I have this piece of code: function MyFunction() { $.ajax({ type: POST, url: ajax.php,
its just like that in other langauges (php in the example) function myFunction($message,$sender=nodoby) {
Is it possible, in php, to pass variables to functions like this: function myfunction($var1=bar,
Let say i have function: <?php function myFunction($param1, $param2, /*0 or more extra args*/)
I have the following function: <?php class Test{ function myFunction(){ return array('first','second','third'); } }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.