3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new ArrayObject(); for( $i=0; $i<100; $i++ ){ $a->$i = $i*100; } foreach($obj->getIterator() as $i){ echo $i; }
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Deprecated: Creation of dynamic property ArrayObject::$0 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$1 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$2 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$3 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$4 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$5 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$6 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$7 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$8 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$9 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$10 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$11 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$12 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$13 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$14 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$15 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$16 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$17 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$18 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$19 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$20 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$21 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$22 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$23 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$24 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$25 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$26 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$27 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$28 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$29 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$30 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$31 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$32 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$33 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$34 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$35 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$36 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$37 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$38 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$39 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$40 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$41 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$42 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$43 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$44 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$45 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$46 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$47 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$48 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$49 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$50 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$51 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$52 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$53 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$54 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$55 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$56 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$57 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$58 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$59 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$60 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$61 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$62 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$63 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$64 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$65 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$66 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$67 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$68 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$69 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$70 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$71 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$72 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$73 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$74 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$75 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$76 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$77 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$78 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$79 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$80 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$81 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$82 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$83 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$84 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$85 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$86 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$87 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$88 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$89 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$90 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$91 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$92 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$93 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$94 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$95 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$96 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$97 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$98 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$99 is deprecated in /in/kvGLn on line 4 Warning: Undefined variable $obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on null in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Deprecated: Creation of dynamic property ArrayObject::$0 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$1 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$2 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$3 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$4 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$5 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$6 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$7 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$8 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$9 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$10 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$11 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$12 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$13 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$14 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$15 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$16 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$17 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$18 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$19 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$20 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$21 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$22 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$23 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$24 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$25 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$26 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$27 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$28 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$29 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$30 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$31 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$32 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$33 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$34 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$35 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$36 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$37 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$38 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$39 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$40 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$41 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$42 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$43 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$44 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$45 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$46 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$47 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$48 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$49 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$50 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$51 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$52 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$53 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$54 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$55 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$56 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$57 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$58 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$59 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$60 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$61 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$62 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$63 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$64 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$65 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$66 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$67 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$68 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$69 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$70 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$71 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$72 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$73 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$74 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$75 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$76 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$77 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$78 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$79 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$80 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$81 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$82 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$83 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$84 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$85 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$86 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$87 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$88 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$89 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$90 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$91 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$92 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$93 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$94 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$95 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$96 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$97 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$98 is deprecated in /in/kvGLn on line 4 Deprecated: Creation of dynamic property ArrayObject::$99 is deprecated in /in/kvGLn on line 4 Warning: Undefined variable $obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on null in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Warning: Undefined variable $obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on null in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 7.0.5 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on null in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Fatal error: Uncaught Error: Call to a member function getIterator() on null in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on unknown in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Call to a member function getIterator() on null in /in/kvGLn on line 6
Process exited with code 255.
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Call to a member function getIterator() on a non-object in /in/kvGLn on line 6
Process exited with code 255.

preferences:
167.42 ms | 401 KiB | 226 Q