Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test PHP Script Online [duplicate]

Tags:

php

ide

testing

Last Month codepad.viper-7.com was down and a lot of stackoverflow answers with code pasted there became broken include some of mine. When it was back all scripts where lost.

Am looking for a free anonymous alternative to codepad.viper-7.com where i can test php scripts with minimal restriction (fopen, curl , mb_strlen etc); on different versions.

There so many of them recommended here but its difficult to find suitable replacement to codepad.viper-7.com

Simple Testing Script

<?php
   echo strlen(file_get_contents("http://google.com"));
?>

Output

  • codepad.viper-7.com = 43736
  • sandbox.onlinephpfunctions.com = disabled
  • writecodeonline.com = disabled
  • exorithm.com = 43736 but non-anonymous func, print_r etc disabled
  • codepad.org = failed
  • ideone.com = disabled
  • coderun.com = 43736 but Only PHP Version 5.3.1 supported
  • codeanywhere.net = Registration Required
  • eval.in = Forbidden syscall socketcall
  • 3v4l.org = failed

Question:

Is there any anonymous alternative with minimal restrictions ?

like image 690
Baba Avatar asked Dec 21 '12 08:12

Baba


People also ask

How can I check my PHP code online?

You can test PHP MySQL with PDO, and also test PHP Sodium (PHP 7.4. 8 and PHP 8 Only). To execute your code, you must copy and paste, drag and drop a PHP file or directly type in the "PHP code" online editor below, and click on "Run" button. You can see the user guide to help you to use this php sandbox tool.

How do you check PHP code is working or not?

You can load your PHP script into your browser by pressing ↵ Enter. Your page will load correctly if your script is working. If you have errors in your script, you will receive errors or your page will not load properly.

How do I find error codes online?

PHP code checker tool PHP error checker tool allows to find syntax errors (lint). You can test your PHP code online directly in your browser. If a syntax error is detected, then the line in error is highlighted, and it jumps to it to save time (no need to search the line).


1 Answers

You can try phpfiddle.org. But be aware that http://google.com is redirected to https://www.google.com, so file_get_contents will return 301 Moved.

like image 98
Peter Krejci Avatar answered Oct 16 '22 23:10

Peter Krejci