3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my = <<<MY ablk_helper 13597 1 aesni_intel aesni_intel 55624 2 aes_x86_64 17131 1 aesni_intel ahci 25819 7 arc4 12608 2 bbswitch 13943 0 bluetooth 391136 22 bnep,btusb,rfcomm bnep 19624 2 btusb 32412 0 ccm 17773 1 cfg80211 484040 3 iwlwifi,mac80211,iwldvm coretemp 13435 0 crc32_pclmul 13113 0 crct10dif_pclmul 14289 0 crc_itu_t 12707 1 udf cryptd 20359 3 ghash_clmulni_intel,aesni_intel,ablk_helper ctr 13049 1 drm 303102 7 i915,drm_kms_helper drm_kms_helper 53081 1 i915 gf128mul 14951 1 lrw ghash_clmulni_intel 13216 0 glue_helper 13990 1 aesni_intel hid 106148 2 hid_generic,usbhid hid_generic 12548 0 i2c_algo_bit 13413 1 i915 i915 783805 6 ideapad_laptop 18216 0 intel_powerclamp 14705 0 intel_rapl 18773 0 iptable_filter 12810 0 ip_tables 27239 1 iptable_filter iwldvm 232285 0 iwlwifi 169932 1 iwldvm joydev 17381 0 kvm 451511 0 libahci 32716 1 ahci lp 17759 0 lpc_ich 21080 0 lrw 13286 1 aesni_intel mac80211 630653 1 iwldvm mac_hid 13205 0 mei 82276 1 mei_me mei_me 18627 0 mii 13934 1 r8169 nls_iso8859_1 12713 1 nls_utf8 12557 1 nvram 14411 1 thinkpad_acpi parport 42348 3 lp,ppdev,parport_pc parport_pc 32701 0 ppdev 17671 0 psmouse 106678 0 r8169 67581 0 rfcomm 69160 8 rts5139 335409 0 serio_raw 13462 0 snd 69322 21 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,thinkpad_acpi,snd_seq_device,snd_seq_midi snd_hda_codec 192906 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel snd_hda_codec_hdmi 46368 1 snd_hda_codec_realtek 65580 1 snd_hda_intel 56451 5 snd_hwdep 13602 1 snd_hda_codec snd_page_alloc 18710 2 snd_pcm,snd_hda_intel snd_pcm 102099 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel snd_rawmidi 30144 1 snd_seq_midi snd_seq 61560 2 snd_seq_midi_event,snd_seq_midi snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi snd_seq_midi 13324 0 snd_seq_midi_event 14899 1 snd_seq_midi snd_timer 29482 2 snd_pcm,snd_seq soundcore 12680 1 snd sparse_keymap 13948 1 ideapad_laptop thinkpad_acpi 81013 0 ts_bm 12599 0 udf 89723 1 usbhid 52570 0 uvcvideo 80885 0 video 19476 1 i915 videobuf2_core 40664 1 uvcvideo videobuf2_memops 13362 1 videobuf2_vmalloc videobuf2_vmalloc 13216 1 uvcvideo videodev 134688 2 uvcvideo,videobuf2_core x86_pkg_temp_thermal 14205 0 xt_string 12586 0 xt_tcpudp 12884 0 x_tables 34059 4 ip_tables,xt_tcpudp,xt_string,iptable_filter MY; $other = <<<MY acpi_pad 87774 0 ahci 41143 0 arc4 1491 0 arcmsr 29902 3 atm 48487 1 pppoatm auth_rpcgss 44917 1 nfs autofs4 27245 3 be2iscsi 92720 0 bluetooth 99222 5 hidp,rfcomm,l2cap bnx2i 48174 0 cls_fw 4431 4 cnic 55543 1 bnx2i crc_ccitt 1733 1 ppp_async crc_t10dif 1557 1 sd_mod cxgb3 152892 1 cxgb3i cxgb3i 24443 0 dca 7101 2 igb,ioatdma dm_log 9946 3 dm_mirror,dm_raid45,dm_region_hash dm_memcache 4237 1 dm_raid45 dm_mirror 14149 0 dm_mod 82903 4 dm_mirror,dm_multipath,dm_raid45,dm_log dm_multipath 17772 0 dm_raid45 64234 0 dm_region_hash 12101 2 dm_mirror,dm_raid45 ecb 2225 0 edac_core 46597 1 i7core_edac ext3 237787 2 ext4 411611 1 vzsnap fscache 53890 1 nfs hidp 19666 2 i2c_core 31084 1 i2c_i801 i2c_i801 11183 0 i7core_edac 18040 0 ib_addr 5979 1 rdma_cm ib_cm 36580 1 rdma_cm ib_core 73827 6 ib_iser,rdma_cm,ib_cm,iw_cm,ib_sa,ib_mad ib_iser 31266 0 ib_mad 39241 2 ib_cm,ib_sa ib_sa 23934 2 rdma_cm,ib_cm igb 177700 0 ioatdma 58145 704 ip6t_REJECT 4711 0 ip6_vznetstat 1874 41 ip6_vzprivnet 9973 0 ip6_vzredir 1418 0 ipmi_devintf 7777 0 iptable_filter 2937 17 iptable_mangle 3493 0 iptable_nat 6302 1 ipt_LOG 6405 14 ipt_REJECT 2399 6 ipv6 326210 4006 vzrst,ip6_vzprivnet,ip6_vzredir,ib_addr,cnic,ip6t_REJECT ip_tables 18151 3 iptable_nat,iptable_mangle,iptable_filter ip_vznetstat 2557 1 ip6_vznetstat ip_vzprivnet 11734 1 ip6_vzprivnet ip_vzredir 1392 0 iscsi_boot_sysfs 9506 1 be2iscsi iscsi_tcp 10227 0 iTCO_vendor_support 3104 1 iTCO_wdt iTCO_wdt 15054 0 iw_cm 8531 1 rdma_cm jbd2 93079 1 ext4 jbd 80198 1 ext3 l2cap 55698 10 hidp,rfcomm libcxgbi 52154 1 cxgb3i libiscsi 47665 7 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libcxgbi,libiscsi_tcp libiscsi_tcp 17004 3 iscsi_tcp,cxgb3i,libcxgbi lockd 77157 2 vzrst,nfs lp 9306 0 mbcache 8209 2 ext4,ext3 mdio 4785 1 cxgb3 nfs 434839 2 vzrst,vzcpt nfs_acl 2663 1 nfs nf_conntrack 80232 8 vzrst,vzcpt,nf_nat_ftp,nf_conntrack_ftp,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state nf_conntrack_ftp 12929 1 nf_nat_ftp nf_conntrack_ipv4 9946 98 iptable_nat,nf_nat nf_defrag_ipv4 1531 1 nf_conntrack_ipv4 nf_nat 23213 3 vzrst,nf_nat_ftp,iptable_nat nf_nat_ftp 3523 0 output 2425 1 video parport 36209 2 parport_pc,lp parport_pc 22818 0 power_meter 9185 0 pppoatm 4685 0 ppp_async 7874 0 ppp_deflate 4184 0 ppp_generic 25400 4 pppoatm,ppp_async,ppp_deflate,ppp_mppe ppp_mppe 6190 0 pps_core 11378 1 ptp ptp 9463 1 igb rdma_cm 34605 1 ib_iser rfcomm 74136 0 rfkill 19303 1 bluetooth sbs 11929 0 sbshc 4445 1 sbs sch_cbq 16705 2 scsi_transport_iscsi 52999 8 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi sd_mod 38912 4 serio_raw 4642 0 sg 29446 0 shpchp 32794 0 slhc 5821 1 ppp_generic snapapi26 39957 0 snd 70355 8 snd_pcsp,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer snd_mixer_oss 15336 1 snd_pcm_oss snd_page_alloc 8486 1 snd_pcm snd_pcm 86747 2 snd_pcsp,snd_pcm_oss snd_pcm_oss 39491 0 snd_pcsp 8743 0 snd_seq 55791 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event snd_seq_device 6516 3 snd_seq_dummy,snd_seq_oss,snd_seq snd_seq_dummy 1800 0 snd_seq_midi_event 7221 1 snd_seq_oss snd_seq_oss 29988 0 snd_timer 22459 2 snd_seq,snd_pcm soundcore 8022 1 snd sunrpc 266880 5 nfs,auth_rpcgss,nfs_acl,lockd tpm 16166 1 tpm_tis tpm_bios 5927 1 tpm tpm_tis 12276 0 tun 19189 4 uio 10462 1 cnic video 21138 0 vzcompat 1794 0 vzcpt 145544 2 vzrst,vzfs vzdev 2765 17 vzredir,vzcompat,vznetdev,vziolimit,vzsnap,vzfs,vzdquota,vzethdev,vzlist,vzmon,vznetstat vzdquota 55339 42 vzfs,[permanent] vzethdev 8189 0 vzevent 2179 1 vzfs vzfs 106104 35838 vzsnap vziolimit 3719 0 vzlinkdev 3878 0 vzlist 26563 0 vzmon 24366 47 vzredir,vzrst,vznetdev,vzcpt,vzlist,vzstat vznetdev 18856 83 vzredir vznetstat 15062 3 vzredir,ip6_vznetstat,ip_vznetstat vzredir 9049 0 vzrst 192234 0 vzsnap 20639 1 snapapi26 vzstat 10299 0 xor 4703 1 dm_raid45 xt_dscp 2073 0 xt_DSCP 2849 0 xt_hl 1547 0 xt_length 1338 0 xt_limit 2134 12 xt_multiport 2716 19 xt_recent 8505 0 xt_state 1508 95 xt_string 1612 0 xt_tcpmss 1623 0 xt_TCPMSS 3461 1 zlib_deflate 21629 1 ppp_deflate MY; $my = explode("\n", $my); $other = explode("\n", $other); $my = array_map($my, function($m) { return explode(" ", $m)[0]; }); $other = array_map($other, function($m) { return explode(" ", $m)[0]; }); foreach($my as $m) { if(!in_array($other)) print $m."\n"; }
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught TypeError: array_map(): Argument #1 ($callback) must be a valid callback or null, array callback must have exactly two members in /in/6hvXL:253 Stack trace: #0 /in/6hvXL(253): array_map(Array, Object(Closure)) #1 {main} thrown in /in/6hvXL on line 253
Process exited with code 255.
Output for 8.1.0 - 8.1.28
Fatal error: Uncaught TypeError: array_map(): Argument #1 ($callback) must be a valid callback or null, array must have exactly two members in /in/6hvXL:253 Stack trace: #0 /in/6hvXL(253): array_map(Array, Object(Closure)) #1 {main} thrown in /in/6hvXL on line 253
Process exited with code 255.
Output for 8.0.0 - 8.0.30
Fatal error: Uncaught TypeError: array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members in /in/6hvXL:253 Stack trace: #0 /in/6hvXL(253): array_map(Array, Object(Closure)) #1 {main} thrown in /in/6hvXL on line 253
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in /in/6hvXL on line 253 Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in /in/6hvXL on line 254 Warning: Invalid argument supplied for foreach() in /in/6hvXL on line 256
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/6hvXL on line 253
Process exited with code 255.
Output for 4.4.3 - 4.4.9, 5.1.0 - 5.1.1, 5.1.3 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/6hvXL on line 253
Process exited with code 255.
Output for 4.4.2, 5.1.2
Parse error: syntax error, unexpected T_FUNCTION in /in/6hvXL on line 255
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/6hvXL on line 253
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/6hvXL on line 253
Process exited with code 255.

preferences:
232.89 ms | 401 KiB | 355 Q