Answers for "const php"

PHP
1

php déclarer une constante URL

<?php
  define("CONSTANT", "Bonjour le monde.");
  echo CONSTANT; // affiche "Bonjour le monde."
?>
Posted by: Guest on December-23-2020
-1

php const

<?php
    define('CONSTANT', 'Hello world !');
    const CONSTANT = 'Hello world !';
    const NEW_CONSTANT = CONSTANT.' And beyond...';
    const ANIMALS = array('dog', 'cat', 'ant');
    define('ANIMALS', array('dog', 'cat', 'ant'));
?>
Posted by: Guest on March-16-2021
0

php constant

<?php
define("PI",3.14);
echo PI;
echo constant("PI");
?>
Posted by: Guest on September-03-2021
0

construtor php

class BaseClass {
    function __construct() {
        print "In BaseClass constructor\n";
    }
}

class SubClass extends BaseClass {
    function __construct() {
        parent::__construct();
        print "In SubClass constructor\n";
    }
}
Posted by: Guest on September-03-2020
1

php define constant

<?php
 define("GREETING", "Constant value ");
echo GREETING;
?>
Posted by: Guest on August-24-2021
0

PHP constant

class Human {
  const TYPE_MALE = 'm';
  const TYPE_FEMALE = 'f';
  const TYPE_UNKNOWN = 'u'; // When user didn't select his gender
  
  .............
}
Posted by: Guest on September-08-2021

Browse Popular Code Answers by Language