php self
snippet in php

php self

user4571

<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >

When to use self over $this

user2475

class X {
    private $non_static_member = 1;
    private static $static_member = 2;

    function __construct() {
        echo $this->non_static_member . ' '
           . self::$static_member;
    }
}

new X();