Created
February 9, 2017 15:56
-
-
Save exileed/bc4cce884ddf2655b3c9ce4fee10cf34 to your computer and use it in GitHub Desktop.
Image resize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$image = new class { | |
public width = null; | |
public height = null; | |
public function __construct($filename) { | |
list($width, $height) = getimagesize($filename); | |
$this->width = $width; | |
$this->height = $height; | |
} | |
public function resize($width, $height) { | |
// some code | |
} | |
}; | |
$image->resize(500, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment