3v4l.org

run code in 300+ PHP versions simultaneously
<?php function setClipPath($strokeColor, $fillColor, $backgroundColor) { $draw = new \ImagickDraw(); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $clipPathName = 'testClipPath'; $draw->pushClipPath($clipPathName); $draw->rectangle(0, 0, 250, 250); $draw->popClipPath(); $draw->setClipPath($clipPathName); $draw->rectangle(200, 200, 300, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); header("Content-Type: image/png"); echo $imagick->getImageBlob(); } setClipPath("rgb(0, 0, 0)", "DodgerBlue2", "rgb(225, 225, 225)");
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "ImagickDraw" not found in /in/lSXSA:6 Stack trace: #0 /in/lSXSA(30): setClipPath('rgb(0, 0, 0)', 'DodgerBlue2', 'rgb(225, 225, 2...') #1 {main} thrown in /in/lSXSA on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.59 ms | 401 KiB | 8 Q