//方法一:
$a ="abc";
$b="def";

$a = $a^$b;
$b = $b^$a;
$a = $a^$b;

//方法二:
list($a, $b)= array($b, $a);

//方法三:
$a = $a . $b;
$b = strlen( $b );
$b = substr( $a,0,(strlen($a)- $b ));
$a = substr( $a, strlen($b));

//方法四:(这个就比较有限制,必须用一个两个字符串都都不能出现的字符做为分隔符)
$a = $b.','.$a ;
$a = explode(',', $a);
$b = $a[1];
$a = $a[0];

//方法五:(这个是当两个数都是数字的时候)
$a = $a + $b;
$b = $a - $b;
$a = $a - $b;

有关注的可以加微信共同讨论一下!

最新文章

  1. 戏说HTML5
  2. Zookeeper:通过yarn实现大型分布式管理系统
  3. $.each与$().each
  4. RabbitMQ 入门
  5. Atitit. Xss 漏洞的原理and应用xss木马
  6. Windows远程桌面连接Ubuntu 14.04
  7. IEnumerator/IEnumerable接口
  8. Servlet个人总结
  9. Redmine配置
  10. 【转】ubuntu14.04 trusty的源
  11. Windows Phone开发(7):当好总舵主
  12. BZOJ4503 两个串 多项式 FFT
  13. 《python语言程序设计》_第三章(数字函数、字符串和对象)
  14. npm 更新版本
  15. ASP.NET MVC4在部署IIS后,运行时显示的是整个Web的目录列表
  16. Codeforces Round #437 B. Save the problem!
  17. excel技巧--一键求和
  18. [Error] 'exit' was not declared in this scope的解决方法
  19. php静态变量与方法与phar的使用
  20. js数组遍历some、foreach、map、filter、every、lastIndexOf、indexOf对比

热门文章

  1. 正确处理类的复合关系------新标准c++程序设计
  2. 进阶Kotlin-常见关键字
  3. luoguP3835 [模板]可持久化平衡树
  4. HttpClient 基于连接池的使用
  5. VS2019和net core 3.0(整理不全,但是孰能生巧)
  6. OpenStack-Mitaka
  7. [转][Unity3D]引擎崩溃、异常、警告、BUG与提示总结及解决方法
  8. 3.mouseenter和mouseover事件的区别
  9. bootstrap的使用2
  10. 【Leetcode】Maximum Product Subarray