3v4l.org

run code in 300+ PHP versions simultaneously
<?php $order = 'a:1:{s:12:"order_entity";O:8:"stdClass":24:{s:3:"uid";s:1:"1";s:6:"status";s:17:"checkout_complete";s:4:"type";s:14:"commerce_order";s:8:"order_id";s:8:"10436081";s:12:"order_number";s:8:"10436081";s:11:"revision_id";N;s:4:"mail";s:20:"commerce@example.com";s:4:"data";a:0:{}s:7:"created";i:1340202197;s:7:"changed";i:1340202197;s:8:"hostname";s:11:"10.45.76.81";s:16:"field_global_uid";a:1:{s:3:"und";a:1:{i:0;a:1:{s:5:"value";s:9:"301214635";}}}s:12:"external_uid";a:1:{s:3:"und";a:1:{i:0;a:1:{s:5:"value";s:9:"301214635";}}}s:11:"application";a:1:{s:3:"und";a:1:{i:0;a:1:{s:5:"value";s:10:"life_cover";}}}s:6:"is_new";b:1;s:18:"revision_timestamp";i:1340202197;s:17:"revision_hostname";s:11:"10.45.76.81";s:12:"revision_uid";s:1:"1";s:20:"commerce_order_total";a:1:{s:3:"und";a:1:{i:0;a:3:{s:6:"amount";i:0;s:13:"currency_code";s:3:"GBP";s:4:"data";a:1:{s:10:"components";a:1:{i:0;a:3:{s:4:"name";s:10:"base_price";s:5:"price";a:3:{s:6:"amount";i:0;s:13:"currency_code";s:3:"GBP";s:4:"data";a:0:{}}s:8:"included";b:1;}}}}}}s:3:"log";s:0:"";s:27:"field_order_completion_date";a:1:{s:3:"und";a:1:{i:0;a:4:{s:5:"value";i:0;s:8:"timezone";s:13:"Europe/London";s:11:"timezone_db";s:3:"UTC";s:9:"date_type";s:9:"datestamp";}}}s:26:"field_order_published_date";a:1:{s:3:"und";a:1:{i:0;a:4:{s:5:"value";i:0;s:8:"timezone";s:13:"Europe/London";s:11:"timezone_db";s:3:"UTC";s:9:"date_type";s:9:"datestamp";}}}s:17:"field_failed_sync";a:1:{s:3:"und";a:1:{i:0;a:1:{s:5:"value";s:2:"-1";}}}s:14:"field_imported";a:1:{s:3:"und";a:1:{i:0;a:1:{s:5:"value";s:1:"0";}}}}}'; foreach ($order['order_entity']->commerce_line_items['und'] as $delta => $item) { echo "Hello"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /in/gbahB:5 Stack trace: #0 {main} thrown in /in/gbahB on line 5
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:
46.44 ms | 401 KiB | 8 Q