?type in php
<?php
/*
Variables can store data of different types, and different data types can do different things.
PHP supports the following data types:
1) String
2) Integer
3) Float (floating point numbers - also called double)
4) Boolean
5) Array
6) Object
7) NULL
8) Resource
*/
// PHP String
$x = "Hello world!";
echo $x;
//PHP Integer
$x = 5985;
var_dump($x);
//PHP Float
$x = 10.365;
var_dump($x);
//PHP Boolean
$x = true;
$y = false;
//PHP Array
$cars = array("Volvo","BMW","Toyota");
var_dump($cars);
//PHP Object
class Car {
function Car() {
$this->model = "VW";
}
}
// create an object
$herbie = new Car();
// show object properties
echo $herbie->model;
//PHP NULL Value
$x = "Hello world!";
$x = null;
var_dump($x);
?>gettype($u)
Also in PHP:
- add display_errors in funtion php
- check if string exists in string php
- cache clear laravel command
- decode base64 php
- call a seeder in databaseseeder laravel
- different date format php
- $_Server php find
- datatype checking in php
- curl in php
- does canada have a monarchy
- data format php
- add seconds to datetime php
- array_unique array to string conversion
- database interaction in codeigniter
- Impossible de trouver le paquet php-gettext
- count with left join in laravel
- base64 decode using php
- create seed in laravel
- creating new project laravel
- check for substring in php
- connect an if statement to an input php
- check array key exists php javascript
- domainn of page php
- artisan run seeder